Deploying notification settings to user/users and URL ques.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
aylesworth
Posts: 31
Joined: Mon Mar 22, 2021 12:57 pm

Deploying notification settings to user/users and URL ques.

Post by aylesworth »

Hello,

Our Nagios instance setup is complete and I'm trying to enable notifications system wide. Notifications are enabled for all hosts, but not for users and host groups (I think).

When I go into the notification settings to deploy the notification prefs to my account to test notifications before I go wide with it, I'm receiving an error "*USER* does not have a valid timeperiod for deployment. The timeperiod will have to be configured from the Core Config Manager.

I've set the timeperiod in my user account, and also created a fresh one from scratch as I thought maybe the old timeperiod from the import was not proper, but I still receive this error.

Additionally, is there a value that can be put into the notification that will take you directly to the node/services page? I have %responseurl% and %xiserverurl% as default, is there a %nodeurl% or %serviceurl% or anything like that? I tried looking through the values available and didn't see anything that stood out immediately.

Thanks!
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Deploying notification settings to user/users and URL qu

Post by benjaminsmith »

Hi,

Let's double-check the contact in the CCM to make sure this contact has a time period assigned to it.

Go to the CCM->Contacts, click on this contact/user, go to "Alert Settings", and select a notification timeperiod from the "Host/Service Notifications Time period" drop-down menus. For example, select nagiosadmin_notification_times, Save. Apply Configuration. Then test this again and let me know if the issue is resolved.

If not, please send us the system profile.

To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button

Regarding the second question, you can also use custom variables and create your own variables, see page 7. For example a link to the main service status or host status page, but this would require login to access. Let me know if that would work for you.

https://assets.nagios.com/downloads/nag ... iables.pdf

Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
aylesworth
Posts: 31
Joined: Mon Mar 22, 2021 12:57 pm

Re: Deploying notification settings to user/users and URL qu

Post by aylesworth »

Hi Benjamin,

Thanks for the info. I mentioned in the original post that I have already tried creating and assigning a brand new timeperiod through the CCM. The same error persists.

My system profile is attached here, the user in question is 'adaayl'. I will look into the variables for my alerts, thanks for that as well.

Moderator's Note: The profile has been shared with the support team but has been removed from the public forum.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Deploying notification settings to user/users and URL qu

Post by benjaminsmith »

Hi @aylesworth,

Thanks for the system profile. I'm reviewing it right now and will follow up shortly.

Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Deploying notification settings to user/users and URL qu

Post by benjaminsmith »

Hi,

Okay, so after looking over the profile, I noticed a few things. One is crashed tables, those cleared out by I would recommend keeping on eye the database log and let us know if this keeps occurring (we can switch the database storage engine type)

Code: Select all

210405 19:06:43 [ERROR] mysqld: Table './nagios/nagios_contactnotifications' is marked as crashed and last (automatic?) repair failed
There's also a useful plugin for monitoring the database tables on the Nagiso Exchange.
https://exchange.nagios.org/directory/P ... us/details

For the main issue, it's related to the relationship between XI and Core contacts. For thus functionality to work properly there has to be an association between the XI user account and the Nagios Core Contact Object. Basically, when you update the time periods in that menu it's updating the time period linked to the Core Contact for the user. The relationship is defined by the following items:
The Nagios Core contact that corresponds to the user account must have the following properties:
◦ Host notification command is xi_host_notification_handler
◦ Service notification command is xi_service_notification_handler
◦ Host and service notification time periods are both set to <username>_notification_times
▪ e.g. jdoe_notification_times
See: https://assets.nagios.com/downloads/nag ... ntacts.pdf

This user account does not have adaayl_notifcaiton_times set this it cannot load and update the time period. Please update the Contact Object to use this time period and also change the notification handlers to:

Code: Select all

service_notification_commands	xi_service_notification_handler
host_notification_commands	xi_host_notification_handler
Currently, this contact has 27 notification handlers set which is going to cause issues since it's going to run every one of those commands when there is a notification event (many of them are not notification commands).
contact.png

Code: Select all

	service_notification_commands	xi_service_notification_handler,xi_service_event_handler,xi_host_notification_handler,xi_host_event_handler,process-service-perfdata-pnp-normal,process-service-perfdata-file-pnp-bulk,process-service-perfdata-file-bulk,process-service-perfdata-file,process-service-perfdata,process-host-perfdata-pnp-normal,process-host-perfdata-file-pnp-bulk,process-host-perfdata-file-bulk,process-host-perfdata-file,process-host-perfdata,notify-service-by-email,notify-host-by-email,notify-by-epager,notify-by-email,host-notify-by-epager,host-notify-by-email,check_none,check-mk-notify,check-mk-inventory,check-mk-host-ok,check-mk-dummy,check-mk,check-host-alive-tftp
	host_notification_commands	xi_service_notification_handler,xi_service_event_handler,xi_host_notification_handler,xi_host_event_handler,process-service-perfdata-pnp-normal,process-service-perfdata-file-pnp-bulk,process-service-perfdata-file-bulk,process-service-perfdata-file,process-service-perfdata,process-host-perfdata-pnp-normal,process-host-perfdata-file-pnp-bulk,process-host-perfdata-file-bulk,process-host-perfdata-file,process-host-perfdata,notify-service-by-email,notify-host-by-email,notify-by-epager,notify-by-email,host-notify-by-epager,host-notify-by-email,check_none,check-mk-notify,check-mk-inventory,check-mk-host-ok,check-mk-dummy,check-mk,check-host-alive-tftp
Let me know if the issue is resolved after making those changes. I would recommend reading the guide in detail as it really helps explain the difference between contacts and users in XI. If you not coming from a Nagios Core background it is a bit confusing.

Let me know if you need further assistance.

Benajmin
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
aylesworth
Posts: 31
Joined: Mon Mar 22, 2021 12:57 pm

Re: Deploying notification settings to user/users and URL qu

Post by aylesworth »

Thanks Benjamin,

That indeed fixed the issue. Nagios was sort of dropped into my lap as a very old core install, I opted to upgrade it to XI (via migration) so that we were current with patches, etc. and now here I am :) sort of learning as I go.

Thanks again!
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Deploying notification settings to user/users and URL qu

Post by benjaminsmith »

Hi @aylesworth,

Your welcome! Glad that's working now.

We'll go ahead and close this one, but feel free to open another if you have new questions.

Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked