Page 2 of 2
Re: SMStools
Posted: Wed Sep 18, 2019 9:15 am
by mbellerue
I'm sorry, I had you run useradd. The correct command is usermod.
Try that command, and then try sending a SMS as the nagios user.
Re: SMStools
Posted: Wed Sep 18, 2019 1:56 pm
by fsodah
I have done above command but still not able to send from nagios
Re: SMStools
Posted: Wed Sep 18, 2019 2:44 pm
by fsodah
I was able to send now from my naios account adding chmod 777, but now how can i test that from nagios applications, I tried i get the following
Re: SMStools
Posted: Thu Sep 19, 2019 10:03 am
by mbellerue
It looks like the variables aren't being populated properly. This is probably because the test is only populating Host Address. So this test will never succeed. However, a live service check may work properly. To test this command, you could setup a service, and then submit enough passive check results to make the service go hard critical.
Also, I feel it's important to at least mention that chmod 777 is very dangerous from a security standpoint.
Re: SMStools
Posted: Thu Sep 19, 2019 12:05 pm
by fsodah
I agree with you i will adjust the 777 soon, but now my issue any host having problem issue i get a notiifcation by email, how can i reach the notification by SMS since i have tested on multiple servers and services .. I am not able to adjust the SMS, where should I look to adjust the SMS alert in the nagios GUI
Re: SMStools
Posted: Thu Sep 19, 2019 4:19 pm
by ssax
You should be able to revert your 777 changes and do this instead:
Code: Select all
chmod g+s /var/spool/sms/outgoing
service httpd restart
Re: SMStools
Posted: Thu Sep 19, 2019 4:40 pm
by mbellerue
You will need to create a new notification command. The command you have in the Run Check Command screenshot above looks like a good command, it is just in the wrong spot to test. Go to Configure -> Core Config Manager -> Commands and search for notification. You will see some of the commands that have been created to notify users by email, and you can use them as an example to create your SMS notification.
Once you have a SMS notification command, you can go to Configure -> Core Config Manager -> Contacts -> select a contact -> Alert Settings. On that page you can manage Host and Service notifications for that user. Once you change either the Host or Service, you can submit passive checks on a test host or service to put it in a hard critical state. When Nagios notifies the contact, it will run the command in the contact's host or service notification setting, which will be your SMS command.
Re: SMStools
Posted: Fri Sep 20, 2019 3:48 am
by fsodah
It works now ..... really appreciate your help
Re: SMStools
Posted: Fri Sep 20, 2019 6:54 am
by scottwilkerson
Great!
Locking