1

I have trying to set up MRTG on my server, following this guide: https://help.ubuntu.com/community/MRTG I followed it as far as,
cfgmaker <snmp_community_string>@<ip_address_of_device_to_be_monitored> > /etc/mrtg.cfg
at this point I have no idea what my snmp community string is, I've looked around to try to find out, some places said this is issued from my ISP, so I asked the datacenter that hosts my server, they said I need to generate my own string, so I google'd that, but still nothing. I also tried public@my_ip, but then I receive this error:

    cfgmaker public@<my_ip_address>
--base: Get Device Info on public@<my_ip_address>:
SNMP Error:
no response received
SNMPv1_Session (remote host: "<my_ip_address>" [<my_ip_address>].161)
                  community: "public"
                 request ID: 1795983726
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
 at /usr/share/perl5/SNMP_util.pm line 629
SNMPWALK Problem for 1.3.6.1.2.1.1 on public@<my_ip_address>::::::v4only
 at /usr/bin/cfgmaker line 960
WARNING: Skipping public@<my_ip_address>: as no info could be retrieved

Use of uninitialized value $comment_sysdescr in substitution (s///) at /usr/bin/cfgmaker line 384.
Use of uninitialized value $sysname in concatenation (.) or string at /usr/bin/cfgmaker line 417.
Use of uninitialized value $comment_sysdescr in concatenation (.) or string at /usr/bin/cfgmaker line 417.
Use of uninitialized value $syscontact in concatenation (.) or string at /usr/bin/cfgmaker line 417.
Use of uninitialized value $syslocation in concatenation (.) or string at /usr/bin/cfgmaker line 417.

Could anyone please tell me how I generate my snmp community string for use with MRTG?

I am using Ubuntu Server 13.04 with kernel 3.2.0-51-generic.

1

What kind of SNMP-capable device are you going to monitor (with IP address my_ip_address)?

The SNMP "community string" is kind of like a password. An SNMP application/MRTG will present the community string to that device when it requests statistics. If the community string is not correct, the device will not respond.

The community string is set in the device configuration, in the MRTG configuration file and they must be the same. "Public" is usually the default community string for read-only access.

It seems you are missing snmpd daemon running and configured on that machine so you can't get any SNMP response. You will need to install related packages, MIBS and set the community string first. This is summarized in this guide.

  • Aha! :) I had to install and enable MIBS, then remove the systemonly argument from rocommunity, and change the access from localhost to my_ip, and the same with the agent setting, now it works :D ty – Mr. King Aug 24 '13 at 5:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.