On Thursday, January 4, 2024 at 4:54:05 AM UTC-5 [email protected] wrote:

I just looked at your files, I think "tell me if it's true" that your 
Nagios is on the same machine as "Weewx"; my Nagios is on a server outside 
the RPi, so I think there must be something missing in the programs to run 
it remotely, like I have in the other Nagios plugins; for example: -H 
$HOSTADDRESS$ etc etc;

patrick,

if nagios is on the same machine, then you can run the plugin directly. but 
if nagios is on a different machine, then you must install the "nagios 
remote plugin executor" (NRPE) on the machine running weewx.  then NRPE 
will run the plugin.

if you do not want to install NRPE on the weewx machine, then you must talk 
to the weewx machine over standard network interfaces. in that case, your 
nagios plugin might do an http/https request to the weewx machine to see 
when the weewx report was last updated.  of course, this assumes that you 
are running a web server on the weewx machine to publish your weewx 
reports.  you could also run a nagios ssh plugin - in that case, the plugin 
should execute a command on the weewx machine that returns the information 
you want in nagios.  that would use the same approach that you see in the 
nagios_wview plugin (check for existance of weewxd process, check database 
timestamp, return data from database as performance data), but do it over 
an ssh connection with shell scripting.

another approach would be to write a weewx service, say weewx-nagios, that 
listens on a network port then provides the information about weewxd and 
report status when it is queried.  

or create a weewx-snmp extension that runs on the weewx machine, gathers 
the weewx and report status, but responds to standard snmp queries. that 
would be the most generic approach, and would let you monitor weewx using 
much any tool that can do snmp - nagios, icinga, prtg, zabbix, etc.

m

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/015ce033-e6db-431e-b63b-7f08cb9291f7n%40googlegroups.com.

Reply via email to