Nagios is an awesome monitoring tool, if you know how to configure it correctly it will not only help system and network administrators to know where the failure is, but it can help non-IT people such as customer care and sells to know about the system status or specific services actions.
One of the hardest things to carry on with Nagios is that you usually don't have a window always open or not always in front of the computer. If you are an IT guy, that could be easily fixed by installing a Nagios client on your cell phone, I recommend you to give a try to TiNag. But if you are not an IT guy, TiNag is not what you need. Some could say that email would be enough, but the truth is that cell phones usually check email every 15 mins (or longer), and people don't attend emails right away; emails are not meant to be read on the spot. On the other hand, I believe SMS is the solution. Texts are sent almost in real-time, a text is almost read in the next 30 secs (do not believe me, send a text to someone aside of you and check it).
I will show here how to enable the SMS with Nagios.
Just follow this steps. My directions are for CentOS 7, but you can use them in any Linux flavour.
define command{
command_name host_notify_by_sms
command_line curl --request POST --url 'https://api.apidaze.io/99999999/sms/send?api_secret=XXXXXXXXXXXX' --header 'Content-Type: application/x-www-form-urlencoded' --data 'from=19999999999&to=$CONTACTPAGER$&body=hostname : $HOSTNAME$ State: $HOSTSTATE$ Address: $HOSTADDRESS$ Date/Time: $DATE$'
}
define command{
command_name service_notify_by_sms
command_line curl --request POST --url 'https://api.apidaze.io/99999999/sms/send?api_secret=XXXXXXXXXXXX' --header 'Content-Type: application/x-www-form-urlencoded' --data 'from=19999999999&to=$CONTACTPAGER$&body=$SERVICEDESC$ State: $SERVICESTATE$ Date/Time: $LONGDATETIME$'
}
define contact{
contact_name dlucio
use generic-contact
alias Full name of user
email This email address is being protected from spambots. You need JavaScript enabled to view it.
pager 15555555555
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_commands host_notify_by_sms
service_notification_commands service_notify_by_sms
}
define contactgroup{
contactgroup_name infrastructure
alias Server managers
members dlucio
}
define host{
use linux-server
host_name myserver.company.com
alias myserver
contact_groups infrastructure
}
define service{
use local-service
host_name myserver.company.com
service_description SSH
check_command check_ssh
contact_groups infrastructure
}
You are done, restart the Nagios, if you did your configurations okay, then you will start getting texts on your cell phone.
Good question, and I am glad you keep reading. Nagios can virtually monitor anything you ask for. Writing a specific plugin is really easy. So, what are the use cases where Nagios could help on non-IT matters? Here there are some examples:
These are some examples I just thought where Nagios is very useful. Since I am an IT guy, I can only say I use it to monitor all the server I have under my management.
Good luck!
blog comments powered by DisqusMost Read Posts in Technology
About
Read about IT, Migration, Business, Money, Marketing and other subjects.
Some subjects: FusionPBX, FreeSWITCH, Linux, Security, Canada, Cryptocurrency, Trading.