Page 1 of 1

Lost the contents of our /etc/snmp/snmp.conf file

Posted: Mon Sep 23, 2019 9:59 am
by randlebailey
I was following steps to update our snmp.conf file when I ended up with only 1 line in it that contains:

mibs +ALL

Prior to issuing the command to add this line, I did not create a copy of my snmp.conf file. I fear I've overwritten some important info. I have NOT restarted the httpd service yet.

1) Will this single entry be sufficient to allow our snmp queries to continue to work?
2) If I have to restore my snmp.conf file, how can I do this? I have a recent weekly backup in /store/backups and a recent snapshot.
3) I'm not sure what was in our snmp.conf file prior to be overwritten, thus the restore looks most viable.

Re: Lost the contents of our /etc/snmp/snmp.conf file

Posted: Mon Sep 23, 2019 12:22 pm
by mbellerue
Having mibs +ALL basically loads up all of the mibs that the system has access to. As a result, this may throw a bunch of warnings. But it should be just fine. Alternately, you can specify which mib file(s) you would like to load. Like so.

Code: Select all

mibs +MyNetworking-MIB
mibs+MyBrandNameServer-MIB
If you would rather just restore the snmp.conf file, you can download a backup, and extract the snmp.conf file. I am attaching a screenshot for reference. Just extract the snmp.conf file from the etc-snmp.tar.gz file within the Nagios backup, and either get it copied over to the server, or copy/pate the contents. Whatever you're most comfortable with.

Re: Lost the contents of our /etc/snmp/snmp.conf file

Posted: Mon Sep 23, 2019 1:18 pm
by randlebailey
Awesome - thanks for the reply!

Feel free to lock this thread with my thanks.

Re: Lost the contents of our /etc/snmp/snmp.conf file

Posted: Mon Sep 23, 2019 1:35 pm
by randlebailey
I was able to restore the latest backup snmp.conf file and it has the very same line as my updated one did. :roll:

I made this way too difficult. But at least I can restore single files now.

Thanks again!