Here's a great website. It's pretty easy...just writem the script and then put it in your plug-ins folder.
so heres kind of a quick article that will probably give an idea. Heres also a setup guide
Long story short you can literally monitor anything/everything you want as long as its on the network. It does this by doing service checks or SNMP traps for networking. Back when i created my nagios server for my old company it took about a month to write out all the service checks and other scripts for 150 servers and about 1200 services/instances. As far as the implementation, it just runs off a standalone server (Linux) that sends out call/receive commands. I really really like Nagios because of how flexible it is and all the additional plugins. Like one of there cool ones we had for HP printers where it would actually tell us when tower was getting low and so on so forth. But you can write your own service checks and templates so you can monitor different servers with different monitoring scopes. It really is a very open and customizable program.
You can even take nagios further and use other plugins like NagVis that can give you a customized view of how you see nagios. That uses googles API so if you are cross country you have that advantage.
I am not sure if i got your issue right... How ever, network outages on one location can be avoided by redundancy of the network.
If you are monitoring multiple datacenters on different locations, it could become tricky to keep everything redundancy. We use openITCOCKPIT to resolve this issue. This provieds a Master/Slave system. The Master System keeps all monitoring configuration and provide the web interface. The Slave (Satellite Systems) is located at the remote datacenter and executing the checks. If the Master server lost connection to the slave system, the slave will cache all check results. As soon as the connection is back, the master system will post process the cached data from the slave. Master and slave are always connected using an SSH tunnel.
The master system will also generate all configuration files for Nagios for the master and all connected satellite systems. https://openitcockpit.io/beginners/8-setup-distributed-monitoring/
The best: You don't need to care about anything. Just install a Master and a Slave, exchange the SSH keys and thats it. SSH tunneling, caching, config file generation, web interface - all handled by the system itself.
Try installing these packages: php libapache2-mod-php
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04 might be helpful in getting php working.
Something weird is going on, but I am not seeing it here.
Perhaps try enabling and looking at your debug log? This should tell you exactly what command is being run.
openITCOCKPIT makes it really easy to monitor Windows, Linux and macOS Systems through the own monitoring agent: https://openitcockpit.io/beginners/11-monitoring-through-openitcockpit-agent/
>Reporting objects are contacts?
My english was bad on this.
"Are 'Reporting objects' Nagios Contacts in your context?" would be a better sentence i guess^^ In the Nagios universe Contacts are used to send notifications but i never had heard of 'Reporting objects' So i was a bit confused
Anyway
>But this answer is disappointing, since it's absolutely the sort of thing one should audit. "Do all of my machines have the right alerting?"
I work with Nagios Core for more than 10 years now but i never wrote the config files by hand. I always used this configuration tool (and I'm also part of the development team)
I never understood why admins would run Nagios without an config tool or an attached database
Technical enabling Nagios to send mails isn't a big thing. Are you trying to setup nagios from scratch or is this a legacy system you need to live with?
Nagios it self is not sending the mail. Nagios will only call a defined command (a bash script or so) which will send the mail using linux commands. However, a lot of things can go wrong and it can be tricky to find the issue - especially if you are not so familiar with linux at all.
​
So if you are starting with Nagios right now I would recommend you to use a monitoring suite which comes with an easy to use GUI and documentation. There are a few out there, also open source like: https://openitcockpit.io/beginners/7-setup-email-notifications/
If you have to go with your current setup you need to go through all the required steps like checking the mailserver (maybe postfix or exim), executing the mail script manually, checking your notification command in nagios, checking your contact definition and timeperiod definition, make sure enable_notifications is set to 1 in nagios.cfg etc... etc...
You can give https://openitcockpit.io/ a try. It's an open source web interface to create Nagios/Naemon configuration files. Providing an JSON API, Debian packages, and lots of other stuff.
If you are a little bit lucky, you can also import your current nagios configs: https://github.com/it-novum/openITCOCKPIT-configuration-import
If you format the output of your check script to comply with Nagios requirements, you can include your check in the NCPA configuration and create a Passive service in Nagios to receive.
https://www.nagios.org/projects/nagios-config-tools/ has some possibilities for you.
Nagios XI, the paid version, pretty much eliminates the text editing.
Personally I stopped using plain Nagios Core years ago. Check-mk is built on top of Nagios Core but has a lot of added things, including service discovery with hundreds, maybe thousands, of preset checks. Because it is built on top of Nagios, any add-ons or plugins you had will still work
It also refers to NRPE, and there are even better agents out there now: https://www.nagios.org/ncpa/
And it instructs you to download a binary, then instead of installing that binary to use the package manager? And once you've done all that, to set up swap?
I definitely second the installation guide referenced in auto-m8rs comment.
This ServerFault post is a great reference regarding what you're trying to do.
Your options are to either generate a cron script to set downtime on the host (my preference) or set up timeperiod exclusions.
Agreed on all points, especially Nagios not being great for mapping out a Network. In the past what I've done when taking over for previous SysAdmins with poorly documented networks is install OpenNMS to map the network itself, use that to actually define Nagios hosts and write up documentation, and then take down the OpenNMS installation after.
I can ping the client from the master with no problems, yeah. It appears that nmap can determine that the host is up, here is the output:
[root@master sample-config]# nmap -p5666 $client_ip_addr
Starting Nmap 5.51 ( http://nmap.org ) at 2016-07-28 09:30 CDT Nmap scan report for $client.domain.com ($client_ip_addr) Host is up (0.00021s latency). PORT STATE SERVICE 5666/tcp filtered nrpe MAC Address: $client_mac_addr (Intel)
Nmap done: 1 IP address (1 host up) scanned in 0.24 seconds
Turning off the iptables on the client allowed me to check the client nmap from the master, so it appears that it was an issue with the iptables configuration on the client. Do you know what line I can add to the iptables to allow the connection even when the firewall is on?