ISSUE WHILE UPLOADING MIBS

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ericssonvietnam
Posts: 239
Joined: Mon Jun 27, 2016 11:05 pm

Re: ISSUE WHILE UPLOADING MIBS

Post by ericssonvietnam »

ericssonvietnam wrote:
lmiltchev wrote:Try doubling the value:

Code: Select all

upload_max_filesize = 4M
then restart apache:

Code: Select all

service httpd restart
Let us know if this helped.
Got the message apr_sockaddr_info_get() failed for nagiosxi which i do not usually get after restarting httpd service can you suggest.

[root@nagiosxi NEWMIBS]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: apr_sockaddr_info_get() failed for nagiosxi
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]

But still status is running for httpd


I which configuration file should i check for the processed mibs.
I have the below configuration in the ini file /etc/snmp/snmptt.ini
[TrapFiles]
# A list of snmptt.conf files (this is NOT the snmptrapd.conf file). The COMPLETE path
# and filename. Ex: '/etc/snmp/snmptt.conf'
snmptt_conf_files = <<END
/etc/snmp/VNM_snmptt.conf
END

Do i require to restart the snmptt service
Is it possible to verify that all the MIBS present in the tar are processed properly.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: ISSUE WHILE UPLOADING MIBS

Post by dwhitfield »

First step, are they showing up at http://YOURSERVER/nagiosxi/admin/mibs.php ?

The quickest thing to do, assuming you have a test device and test server, is just to test it and see if it works as anticipated. Please note that each XI install allows for both a test and a backup instance, so there's no reason why you shouldn't be able to test on the XI side.
ericssonvietnam
Posts: 239
Joined: Mon Jun 27, 2016 11:05 pm

Re: ISSUE WHILE UPLOADING MIBS

Post by ericssonvietnam »

dwhitfield wrote:First step, are they showing up at http://YOURSERVER/nagiosxi/admin/mibs.php ?

The quickest thing to do, assuming you have a test device and test server, is just to test it and see if it works as anticipated. Please note that each XI install allows for both a test and a backup instance, so there's no reason why you shouldn't be able to test on the XI side.
I am still getting the below error
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-SCHEDULE-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-EVENT-MIB)
Unknown object identifier: DISMAN-EVENT-MIB::The
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-EVENT-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-EVENT-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-EVENT-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-EVENT-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-EVENT-MIB)
Unknown object identifier: SNMPv2-SMI::
Unknown object identifier: NOTIFICATION-LOG-MIB::The

I have the following in the file below
[root@nagiosxi ietf]# grep zeroDotZero ../../../mibs/SNMPv2-SMI.txt
zeroDotZero OBJECT-IDENTITY
[root@nagiosxi ietf]#


addmib /usr/share/snmp/mibs/mibfilename

do I need to install any module for this???
Kindly suggest i have more mobs which i have to process.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: ISSUE WHILE UPLOADING MIBS

Post by tgriep »

It looks like the SNMPv2-SMI mib file is corrupted as the 'zeroDotZero' option is defined in that file.
Can you run the following as root and post the output so we can see the files in that folder are correct?

Code: Select all

ls -l /usr/share/snmp/mibs
Be sure to check out our Knowledgebase for helpful articles and solutions!
ericssonvietnam
Posts: 239
Joined: Mon Jun 27, 2016 11:05 pm

Re: ISSUE WHILE UPLOADING MIBS

Post by ericssonvietnam »

tgriep wrote:It looks like the SNMPv2-SMI mib file is corrupted as the 'zeroDotZero' option is defined in that file.
Can you run the following as root and post the output so we can see the files in that folder are correct?

Code: Select all

ls -l /usr/share/snmp/mibs
Attached is the output of ls -l command
I have large number of file.Can you suggest the way ahead on the issue.
It also give be below message while service restart as well.
[root@nagiosxi ietf]# service snmptt restart
Stopping snmptt: [ OK ]
Starting snmptt: Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs//DISMAN-EVENT-MIB)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs//DISMAN-SCHEDULE-MIB)
PID file: /var/run/snmptt.pid
[ OK ]
[root@nagiosxi ietf]#
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: ISSUE WHILE UPLOADING MIBS

Post by tgriep »

There are a lot of files that have been uploaded to the server and I am guessing that some of them do not have the required SNMP definitions and that is causing the errors.
When you need to upload a MIB file, for the most part, you do not want to upload over an existing file or a file with a similar name but with different contents as that will generate the errors you are having.

In that folder, are many copies of this file (slightly different name) and the settings in one of them are bad causing the error.

Code: Select all

-rw-rw-r-- 1 root nagios    8932 Jun 30 01:09 SNMPv2-SMI
-rw-rw-r-- 1 root nagios     744 Jun 13  2016 snmpv2-smi.cfg
-rw-rw-r-- 1 root nagios    1398 May 15 21:17 SNMPv2-SMI.mib
-rw-rw-r-- 1 root nagios    8924 Jan 20  2016 SNMPv2-SMI.txt
-rw-rw-r-- 1 root nagios     666 Jun 13  2016 SNMPv2-SMI-v1.cfg
-rw-rw-r-- 1 root nagios    1414 May 15 21:17 SNMPv2-SMI-v1.mib
To fix this, delete all of the above files except this one

Code: Select all

-rw-rw-r-- 1 root nagios    8924 Jan 20  2016 SNMPv2-SMI.txt
There are also a lot of .cfg files in the folder, you should look at them to see if they are valid and it not, remove them as well.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ericssonvietnam
Posts: 239
Joined: Mon Jun 27, 2016 11:05 pm

Re: ISSUE WHILE UPLOADING MIBS

Post by ericssonvietnam »

tgriep wrote:There are a lot of files that have been uploaded to the server and I am guessing that some of them do not have the required SNMP definitions and that is causing the errors.
When you need to upload a MIB file, for the most part, you do not want to upload over an existing file or a file with a similar name but with different contents as that will generate the errors you are having.

In that folder, are many copies of this file (slightly different name) and the settings in one of them are bad causing the error.

Code: Select all

-rw-rw-r-- 1 root nagios    8932 Jun 30 01:09 SNMPv2-SMI
-rw-rw-r-- 1 root nagios     744 Jun 13  2016 snmpv2-smi.cfg
-rw-rw-r-- 1 root nagios    1398 May 15 21:17 SNMPv2-SMI.mib
-rw-rw-r-- 1 root nagios    8924 Jan 20  2016 SNMPv2-SMI.txt
-rw-rw-r-- 1 root nagios     666 Jun 13  2016 SNMPv2-SMI-v1.cfg
-rw-rw-r-- 1 root nagios    1414 May 15 21:17 SNMPv2-SMI-v1.mib
To fix this, delete all of the above files except this one

Code: Select all

-rw-rw-r-- 1 root nagios    8924 Jan 20  2016 SNMPv2-SMI.txt
There are also a lot of .cfg files in the folder, you should look at them to see if they are valid and it not, remove them as well.
Now i am not getting any error while service restart and processed most of the mibs

1.Is there any way to get the mibs directly added in my custom file /etc/snmp/VNM_snmptt.conf instead of /etc/snmp/snmptt.conf
2. I have processed most of the mibs but would like to share the output for Ericsson mibs for which i do not see any EVENT and EXEC statement attached is the output of processed Ericsson MIBScan you check and suggest.
3. I observed 2 errors as well
Unknown object identifier: DISMAN-EVENT-MIB::The
Usage: /usr/local/bin/addmib <mibfile>
Configure snmptt.conf for a given MIB file
Unknown object identifier: NOTIFICATION-LOG-MIB::The
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: ISSUE WHILE UPLOADING MIBS

Post by tgriep »

1. There are a couple of ways you can create your custom files, run the addmib command which will add them to the default file and then you can rename it.
Or you can edit the /usr/local/bin/addmib script and change the name of the output file.

Code: Select all

cmd='/usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*"'
snmpttconvertmib --in="$1" --out=/etc/snmp/VNM_snmptt.conf \
        --exec "$cmd" >> /tmp/snmpttconvertmib.log
You will have to edit the /etc/snmp/snmptt.ini file and add the custom file to the list at the bottom so the snmptt daemon will load it.

2. Not all MIB files contain TRAP entries so if the files you added did not have any, then there is nothing to import.

3. The DISMAN-EVENT-MIB and the NOTIFICATION-LOG-MIB MIB files look like they were replaced on the system.
Delete this copy of the NOTIFICATION-LOG-MIB file. The without the .txt extension
Then delete the DISMAN-EVENT-MIB file and replace it with the one that is attached to the post.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ericssonvietnam
Posts: 239
Joined: Mon Jun 27, 2016 11:05 pm

Re: ISSUE WHILE UPLOADING MIBS

Post by ericssonvietnam »

tgriep wrote:1. There are a couple of ways you can create your custom files, run the addmib command which will add them to the default file and then you can rename it.
Or you can edit the /usr/local/bin/addmib script and change the name of the output file.

Code: Select all

cmd='/usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*"'
snmpttconvertmib --in="$1" --out=/etc/snmp/VNM_snmptt.conf \
        --exec "$cmd" >> /tmp/snmpttconvertmib.log
You will have to edit the /etc/snmp/snmptt.ini file and add the custom file to the list at the bottom so the snmptt daemon will load it.

2. Not all MIB files contain TRAP entries so if the files you added did not have any, then there is nothing to import.

3. The DISMAN-EVENT-MIB and the NOTIFICATION-LOG-MIB MIB files look like they were replaced on the system.
Delete this copy of the NOTIFICATION-LOG-MIB file. The without the .txt extension
Then delete the DISMAN-EVENT-MIB file and replace it with the one that is attached to the post.
I have uploaded all my MIB file and everything is fine now but when i restart the service i get failed but when i checked it my service was already running still i have failure.

[root@nagiosxi ~]# service snmptt restart
Stopping snmptt: [FAILED]
Starting snmptt: PID file: /var/run/snmptt.pid
[ OK ]
Can you suggest what should i do to fix this.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: ISSUE WHILE UPLOADING MIBS

Post by tgriep »

Post all of the files from the /etc/snmp folder so I can view the settings.
Take a look in the /var/log/messages file to see if you can find the error on why the snmptt daemon will not start.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked