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.
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!
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
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.
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!