Learning command-line interfaces
So far, we have discussed using web-based applications to view the current status and manage things such as downtimes or comments.
There are also multiple tools that let us perform the same operations from the command line in a convenient way.
Using nagios_commander
One tool that provides an easy way to manage Nagios and view its data from command line is nagios_commander.
This is a shell script that communicates with Nagios using the web interface, using HTTP-based authentication. Since it is communicating over the network, the script can be run on any machine, not only on the machine where Nagios is running. It can also be used to manage multiple Nagios instances from a single machine.
All that is needed is to have the curl command available on your machine. For Ubuntu-based distributions, we'll need to run the following command:
root@ubuntu:~# apt-get -y install bsdmainutils curl
For CentOS, RHEL, and Oracle Linux, the command...