DEV Community

Imdad Rind
Imdad Rind

Posted on

2

Install SNMP & MRTG on Debian 10 (buster)

Note : this document is only for debian 10 or maybe 9. The process for debian 12 is somewhat different maybe also for 11 too and also i am doing it on VirtualBox

Step 0:

Install the following which are needed to setup snamp

apt install apache2

In my case these were not needed

apt install php7.3 php7.3-gd php7.3-cli

Step 1:

Open your terminal and enter the following

apt install snmp snmpd -y

Step 2:

When snmp and snmpd are installed successfully then open flowing file

nano /etc/snmp/snmp.comf

Step 3:

After opening the file scroll down and do these

Uncomment

rocommunity public localhost

Edit and write

Write the location of the system like “ rack , city, country”
sysLocation "Turbat, Balochistan"

Write the information of admin
sysContact "emdadR, 1103852@stud.uot.edu.pk"

Step 4:

Restart snmp

Service snmp restart

Step 5:

Now type to retrieve information from an snmp agent for…

snmpwalk -v1 -c public localhost

Step 6 :

On this step we need to install “mrtg”

apt install mrtg

Step 7:

At the step we need to make a folder in “ /var/www/html ” for mrtg files and webpages

mkdir /var/www/html/mrtg

Step 8:

Create config file for mrtg

cfgmaker public@localhost > /etc/mrtg.cfg

Step 9 :

Open “ mrtg.cfg “ file for making some changes

nano /etc/mrtg.cfg

Step 10 :

Scroll down and find

“ # for Debian
WorkDir: /var/www/mrtg

And edit it to

WorkDir: /var/www/html/mrtg

Step 11:

Create a index file for mrtg Graph

Indexmaker /etc/mrtg.cfg > /var/www/html/mrtg/index.html

Step 12:

Open the your browser to see the data traffic with mrtg

When you open your browse and enter the following in URL section

Your machine IP Address where apache is installed
Like in my case it installed on my client machine

`192.168.18.11/mrtg
Enter fullscreen mode Exit fullscreen mode

`
Or

Your dns name
Like in my case it is

`http://hello.com/mrtg`
Enter fullscreen mode Exit fullscreen mode

note : i have configured a private DNS on another machine that i have
that's whay i have this .

hello.com

ThankYou ❤️

thank for getting this far

Reference

Billy R Install SNMP & MRTG Debian 10 - YouTube

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay