0

I am working on a project using Nagios to monitor a controller that monitors gas leaks, temperature,... remotely.

How can a Nagios Core in one city communicate and receive supervision information from a station located in another city?

(This field is new to me, specifically I have to use nagios for this purpose).

Thanks in advance.

Vatoch Mr
  • 1
  • 1

1 Answers1

0

There are multiple ways to do this.

My preferred way is to use the SSH plugin to wrap the check command in an SSH session and then call that. This requires that the remote systems are connected to a box reachable via SSH, and that that box can run the appropriate nahios plugins.

For something like sensors, you can usually find away to expose them via SNMP, and ask nagios to query them over SNMP. Unless you like DoS attacks, you will want to firewall SNMP access to known IPs and/or use a VPN to link the 2 networks securely.

If neither of these work you can find a plugin that does (maybe an mqtt plugin or http/s plugin). Failing which, its not that hard to write an arbitrary module in your favourite language to interface with nagios making use of whatever method of communication is available.

(FWIW, look at pnp4nagios if you havnt already. Its won't help you connect to the sensors, but it can plot the results over time which can be very useful to show trends and pinpoint where things departed from normal)

davidgo
  • 5,964
  • 2
  • 21
  • 38
  • Thank you for answering. There was a solution looming on the horizon: buying an IP address fix from an ISP and giving it to the server hosting Nagios, then another server is at the site where the controller is located, the latter collects the information and then sends it to this server after which a file is sent to the Nagios who is reading it Then it displays the results. – Vatoch Mr May 04 '20 at 12:37
  • Something like Passive Checks using an external command file I found mentioned [here](https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/passivechecks.html). Is this a reliable solution as well or not? If yes, can you explain more accurate details of the process, if you know please? – Vatoch Mr May 04 '20 at 12:38
  • I've not used passive checks, so can't help. Why do you need 2 servers though - why not have nagios poll through the Internet - there is no problem doing it once you have appropriate security - which us easily solved with a VPN or firewall. – davidgo May 04 '20 at 19:25