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