host group and sms alerts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
MelsStudios
Posts: 19
Joined: Thu May 07, 2020 9:28 am

host group and sms alerts

Post by MelsStudios »

Hello,

I created a host group with critical core servers as members and I would like get an alert via sms to know if one of those server goes down.

So I created a service, used a check-host-alive template and added the host group , and the contact group.


When I shutdown the test server I did put in that group, I get the usual email alert but no sms.


I know the sms notifcation works if I assign my mobile contact to the host, without using the hostgroup.



Am I doing it the proper way ?

Thank you !

Mick
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: host group and sms alerts

Post by ssax »

Let's take a look and see how it's setup, please PM me a copy of your profile, you can download it from Admin > System Profile > Download Profile button.

PM me the contact name and the test host/service name that you are testing with so we can zero in on the configs.

Did you follow this guide?

https://assets.nagios.com/downloads/nag ... ios-XI.pdf
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: host group and sms alerts

Post by ssax »

I sent you a PM as well.

Please follow these instructions:

Please go to Admin > Manage Email Settings:
- Make sure Logging/Debug is checked
- Click the Update Settings button

Then run this tail command (and leave it running):

Code: Select all

tail -Fn0 /var/log/maillog /usr/local/nagiosxi/tmp/phpmailer.log /usr/local/nagiosxi/var/eventman.log /usr/local/nagiosxi/var/cmdsubsys.log
Then force a notification to be sent then send me the full output of the tail command above and any errors you see on the screen (please test via the service from the instructions below exactly).

Additionally, please send the output of these commands (as root) so that I can check for some other common issues that could be affecting notifications:
- NOTE: You may need to adjust the -h 127.0.0.1, the -uroot, and -pnagiosxi in the first command if your DB is offloaded to another server and/or you've changed the root mysql password

Code: Select all

echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -h 127.0.0.1 -uroot -pnagiosxi --table
ls -l /usr/local/nagiosxi/var/
ls -l /usr/local/nagios/var/
ls -l /usr/local/nagios/var/rw

How to submit passive results for testing:

For Services
---------------

Go to Home > Service Status:
- Find the Service and click on it
- Click the + tab
- Note these two rows:

State Type: Hard
Current Check: 1 of 4

Those columns tell the current State Type and the Current Check number. In order to generate a notification for a service you will need to submit MULTIPLE problem check results (the number that you need to submit is determined by the last number in the Current Check column, that is the max_check_attempts setting). For services, when you submit a passive check result, each result that you submit will be a SOFT state until you submit enough to hit the Max Check Attempts setting that you've defined on the service, only then will the service enter a HARD problem state which will generate the notification (just remember, notifications are only sent on HARD states).

- Click the "Submit passive check result" link
- Select the Check Result and type in some text for the Check Output
- Click the Submit button
- Submit as many as you need, right after another, until the service enters the HARD state so that a notification will be sent

NOTE: When coming from a HARD problem state (whether we are talking about hosts or services) if you submit an OK passive result it should fire off a recovery notification after a single passive result has been submitted.
MelsStudios
Posts: 19
Joined: Thu May 07, 2020 9:28 am

Re: host group and sms alerts

Post by MelsStudios »

Thank you, I will look into it today or tomorrow,
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: host group and sms alerts

Post by ssax »

Interesting, I see the service event but I'm not seeing it even try to send the email for it (even though it's setup properly).

Please create a ticket for this and include a link back to this forum thread so we can get a remote session setup:

https://support.nagios.com/tickets/
MelsStudios
Posts: 19
Joined: Thu May 07, 2020 9:28 am

Re: host group and sms alerts

Post by MelsStudios »

Thank you, I will open a ticket.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: host group and sms alerts

Post by scottwilkerson »

MelsStudios wrote:Thank you, I will open a ticket.
Closing thread, moved to ticket
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked