Error loading a mib

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
iSkyDive
Posts: 17
Joined: Thu Oct 06, 2016 9:18 am

Re: Error loading a mib

Post by iSkyDive »

Oh and last thing, notifications are not send by email anymore ... I don't really know why, it's sad :(

I can receive the test email but not the notifications ones ... even custom notifications aren't working
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Error loading a mib

Post by tgriep »

The first time the XI server receives a trap, it needs to be configured so the system can setup the notifications, etc for that service.
To configure it, you will have to login to the XI GUI and go to Admin > Unconfigured Objects menu and configure the trap. Once that is done, it will automatically receive it.

If you wand to find the OID and it's description, you can run this command to printout the name and OID.

Code: Select all

snmptranslate -m /pathtomibfile/mibfile.mib -TZ
You have to give the full path to the mib file as well as the name of the file itself in the command.

For your notifications, what version of Nagios XI are you running?
Can you provide how the server is setup for it's mail method by going to the Admin > Manage Email Setting screen and post the settings here?
Be sure to check out our Knowledgebase for helpful articles and solutions!
iSkyDive
Posts: 17
Joined: Thu Oct 06, 2016 9:18 am

Re: Error loading a mib

Post by iSkyDive »

When I configure that object on the right host, it create a new host ... For example, my first one is : srvsites.domain.com, that's his name, I activated traps on him, and when I configure the trap, it can only be for : srvsites and it does create a new host ...

I am running the latest version of Nagios XI : 5.3.0

Mail Settings :

General Mail Settings :

Send Mail From: [email protected]
Mail Method: SMTP
Debug Log unchecked

SMTP Settings
Host: 192.168.1.40
Port: 25
Username:
Password:
Security: None


And as I said, the send mail test is working ...

I'm now receiving the custom message, and the messages for the hosts, but never for the services ...

Another thing I could observe : notifications for memory usage are working but not entirely for CPU and disk usage, I only receive the UNKNOW and OK state, but never the CRITICAL or WARNING ones, and they are still similar in notifications options ...

And last thing, totally different : Is there a way to change the Host state from OK to WARNING or CRITICAL, depending on the state of his services ?

For example, if THAT service is CRITICAL, then the HOST ist CRITICAL, or for example : if two services are warning, then the HOST is WARNING, etc ?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Error loading a mib

Post by tgriep »

Below is a link to a document for configuring the XI server for email and Text Notifications. Take a look at it as it will help you in the notification issue you are currently having.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

When a test email is sent, it is directly sent to the SMTP server and does not use any of the user/contact settings when sending.
It is just a quick way to test.

Now is the test works but regular notifications don't, that usually means that the notification settings for the user account and the contact are not configured correctly.
The document has nore details but the user account has to be enabled for each user to receive notifications and the type of notifications as well.
Also, the contact settings in the Core Config Manager > Contacts menu, have to be configured to use this Notification Method.
xi_host_notification_handler
xi_service_notification_handler
This has to setup for the contacts and also the notification options have to be set.

The notification for the CPU and Disk usage probably do not have the Critical / Warning options set to send them.
Go in to the Core Config Manager and edit those services, go to the Alert Settings Tab and select the Notification Options you want and that should fix that.

The ability to change the host state to match a service state cannot be done out of the box by default. You would have to setup a custom event handler script on the service to make the host do down.
If you only want one service to cause the host check to go down, you can edit the host check command to match the service checks command and that would do what you want for at least one service.
Be sure to check out our Knowledgebase for helpful articles and solutions!
iSkyDive
Posts: 17
Joined: Thu Oct 06, 2016 9:18 am

Re: Error loading a mib

Post by iSkyDive »

Hello !

So I did everything as the pdf says, I configured the unique user (admin) to receive all the mails, I enabled all notifications for the disks, and it's still not working ... 1 month ago, I had nothing to do from all of that and I was receiving the mail for those disk usage ...

And I don't find xi_service_notification_handler, neither for the host, in the contact options ?

Concerning this issue, I can read that in /var/log/messages :

Code: Select all

Oct 17 09:50:09 srvnag nagios: SERVICE NOTIFICATION: nagiosadmin;srvhv3.aural.asso.fr;Drive S: Disk Usage;WARNING;xi_service_notification_handler;S:\ Label:HV3-1  Serial Number a8e7837e: 87%used(267063MB/307197MB) (>80%) : WARNING
Oct 17 09:50:37 srvnag nagios: SERVICE NOTIFICATION: nagiosadmin;srvhv4.aural.asso.fr;Drive S: Disk Usage;WARNING;xi_service_notification_handler;S:\ Label:S  Serial Number 2c06fe6c: 92%used(328076MB/358407MB) (>80%) : WARNING
I attach two pictures. They come from the same host. The CPU service is working fine, he is "OK" most of time, and I once received the "WARNING" email followed by the "OK" mail but the CPU is always on "CRITICAL" and I never received mail. On the configuration, I asked to be notified every 5 minutes till the service is down and I'm receiving nothing .. Physical and Virtual memory usage for that same host are working as well ! But the second disk usage on "WARNING' isn't notifying by email ... That is so weird !

For trap issues, I found that Nagios was looking for a "srvhvsites" for example, when I configured it as "srhvistes.domain.com", so now, traps are working, thanks !
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: Error loading a mib

Post by tgriep »

The Alert Settings for those 2 services are inherited from the template that is assigned to them.
Check both of those services templates and see if the Notification settings are configured the way you want then.

If one of the services are always down and the service was acknowledged, doing that will stop the notifications from being sent until the state changes for that service.
When that happens, the notifications will start up again.

You should check those services in the Home > Service Details menu and see if they are acknowledged.
Be sure to check out our Knowledgebase for helpful articles and solutions!
iSkyDive
Posts: 17
Joined: Thu Oct 06, 2016 9:18 am

Re: Error loading a mib

Post by iSkyDive »

I just checked and they are not acknowledged ...

I changed the warning and critical for a disk usage to make him "OK", and I got no email ...

In attachment, it's a screenshots of the notifications, I surrounded the notifications I got via email with a red square, the others, all disk usage, I got nothing ...

On the second screenshot, I only got the unknown notifications via email, ALL the others, I got nothing ...

Oh, and Custom notifications are not working, neither in "forced" or "broadcast" mode

I checked the templates but virtual and physical memory usage uses the same templates as disk usage and I do receive the mail for the virtual and physical memory usage but not for disks... And if I modify the templates, will that modify the notifications for all the existant services or only the new ones ?

Here is my contacts.cfg

Code: Select all

define contact {
        contact_name                            nagiosadmin
        alias                                   Nagios Administrator
        host_notifications_enabled              1
        service_notifications_enabled           1
        host_notification_period                nagiosadmin_notification_times
        service_notification_period             nagiosadmin_notification_times
        host_notification_options               d,u,r,f,s,
        service_notification_options            w,u,c,r,f,s,
        host_notification_commands              xi_host_notification_handler
        service_notification_commands           xi_service_notification_handler
        email                                   [email protected]
        use                                     xi_contact_generic
        }
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: Error loading a mib

Post by tgriep »

If you modify the template, that will propagate to all of the hosts and services that use them.
For a test, go and edit one of the services that are not working, go to the Alert Tab and enable the notifications options, notifications, etc and see if that works.
Also, login to the Xi GUI as that user, click on the username in the top right corner and then click on Notification Preferences menu.
Screen capture that and post is here.
Be sure to check out our Knowledgebase for helpful articles and solutions!
iSkyDive
Posts: 17
Joined: Thu Oct 06, 2016 9:18 am

Re: Error loading a mib

Post by iSkyDive »

In first attachment, that is the alert tab of one of the disk usage for which I got no email ... I tried that, and I still got no email :'(

And the second attachment is the Notification Preferences of the nagiosadmin, which is the only one user...

Finally, the third attachment shows you the commands, just to check if they are right ?

I just checked that :

[root@srvnag snmptt]# tail -f /usr/local/nagiosxi/var/eventman.log
[event_id] => 43024
[event_source] => 2
[event_type] => 2
[event_time] => 2016-10-19 16:03:29
[event_meta] =>
[logging_enabled] => 1
)
ERROR: Could not find user_id for contact ''
..
PROCESSED 19 EVENTS


At this hour (2016-10-19 16:03:29), in notifications tab on Nagios XI UI, I see it's a Drive Disk Usage service problem .... And we can see an ERROR in here, do you have anything to help me resolve that ?
Does that help in something, do you have any clue with that ?
Thanks
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: Error loading a mib

Post by tgriep »

All of the settings look good but that error in the eventman log file is probably it. That service check maybe corrupted.
First, lets repair the MYSQL databases by running the following as root on the XI server.

Code: Select all

mysqlcheck -f -r -u root -pnagiosxi --all-databases
Then edit that service check and remove all of the contacts and groups and save it out and apply the config.
Re-edit it and add the contacts back, save it and apply the config. See if this works.

If not, create a copy of the check and see if the copy works.
Let us know how it works out.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked