I would like to monitor my weather station "weewx" with my Nagios; what process should I monitor to verify that Weewx is active?
thanks all
I will test that tomorrow and I will come back to you.
Bye
Patrick
--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/0f85a5ee-7a8a-4eee-9cab-50fb81233630n%40googlegroups.com.
hello Matthew and Vince.
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;
tell me, because I'm not good at programming.
THANKS
Patrick
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;
thanks Matthew,
that is I think, as windows machine. I will try it.
bye
patrick
--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/015ce033-e6db-431e-b63b-7f08cb9291f7n%40googlegroups.com.
hello Vince,
I test first in local on my RPi.
I have an error with your scrip.
bash secs-since-modified.sh
secs-since-modified.sh: ligne 5 : cd:
$'/var/lib/weewx/weewx.sdb\r': Aucun fichier ou dossier de ce type
secs-since-modified.sh: ligne 8: erreur de syntaxe près du symbole
inattendu « $'do\r' »
'ecs-since-modified.sh: ligne 8: `do
I modified your script only here
#
cd /var/lib/weewx/weewx.sdb => here my archive sdb
echo ""
tell me if I have good for modification.
hello Matthew,
I modified your script and the result
perl check_wview.txt
CRITICAL - last update was 108324 minutes ago at 17:52:17 21 oct.
2023| lastupdate=108323.8;30;120
run in local on RPi for the moment.
patrick
--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/0f85a5ee-7a8a-4eee-9cab-50fb81233630n%40googlegroups.com.
hello again Matthew,
I am testing your script on a RPi of test " no sensors connect", as weewx is "Active: active (exited) since Tue 2023-11-28 21:37:14 CET; 1 months 6 days ago", the error done by your script is good.
[CRITICAL - last update was 108331 minutes ago at 17:52:17 21 oct. 2023| lastupdate=108331.1;30;120]
I modified your script as that;
my $htfile = '/var/www/html/weewx/index.html';
my $dbfile = '/var/lib/weewx/weewx.sdb';
tell if OK.
I installed on my nagios the plugins NRPE and also on my RPI of test.
which command to test in command line with your script.
Your script must be here only my RPi (ip=192.168.0.161) ?
I tried it : ./check_nrpe -H 192.168.0.161 -c check_wview.txt from my Nagios
result: NRPE: Command 'check_wview.txt' not defined
Excuse for my english and I am newbie in programmation.
files on nagios: /usr/local/nagios/libexec/
check_tcp
check_breeze check_ifstatus check_oracle
check_time
check_by_ssh check_imap check_overcr check_udp
check_clamd check_ircd check_ping check_ups
check_cluster check_load check_pop
check_uptime
check_dhcp check_log check_procs
check_users
check_disk check_mailq check_real
check_wave
check_disk_smb check_mrtg check_rpc check_wview.txt
files on RPi: /usr/local/nagios/libexec
272710 drwxrwxr-x 2 nagios nagios 4096 4 janv. 22:41 .
272681 drwxr-xr-x 6 root root 4096 4 janv. 20:44 ..
272711 -rwxrwxr-x 1 nagios nagios 106268 4 janv. 20:44 check_nrpe
272722 -rwxrwxr-x 1 nagios nagios 5783 4 janv. 22:16
check_wview.txt
272721 -rwxr-xr-x 1 nagios nagios 419 4 janv. 21:44
secs-since-modified.sh
/usr/local/nagios/etc
272714 drwxrwxr-x 2 nagios nagios 4096 4 janv. 22:04 .
272681 drwxr-xr-x 6 root root 4096 4 janv. 20:44 ..
272716 -rw-r--r-- 1 nagios nagios 12477 4 janv. 22:04 nrpe.cfg
nrpe.cfg => allowed_hosts=127.0.0.1,::1,192.168.0.200
Patrick
--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/015ce033-e6db-431e-b63b-7f08cb9291f7n%40googlegroups.com.
again me, sorry
I forgot to install the Nagios-plugins on my RPi, now is good with this command:
./check_nrpe -H 192.168.0.161 -c check_load
WARNING - load average per CPU: 0.17, 0.20,
0.13|load1=0.168;0.150;0.300;0; load5=0.200;0.100;0.250;0;
load15=0.133;0.050;0.200;0;
but no good with your script:
./check_nrpe -H 192.168.0.161 -c
check_wview.txt
NRPE: Command 'check_wview.txt' not defined
is it my syntax is correct ?!!!
bye I talk to you tommorow
Patrick
sorry again.
--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/015ce033-e6db-431e-b63b-7f08cb9291f7n%40googlegroups.com.
hello Matthew et Vince,
A good news;
your script , Matthew run well, I searched where I had an error, I forgotted to add your script inside nrpe.cfg
but now I search why I can't install "E: Impossible de trouver le paquet libdb-sqlite3-perl".
result: ./check_nrpe -H 192.168.0.161 -c check_wview.txt
WARN - last update was 53.00 seconds ago at 14:25:15 05 Jan 2024 -
perfdata requested but DBI is not installed|
lastupdate=0.883333333333333;30;120
to be continued
Patrick
--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/015ce033-e6db-431e-b63b-7f08cb9291f7n%40googlegroups.com.
again me,
I can installed the paquet libdbd-sqlite3-perl, I made an error with my keyboard, an other one.....grrrrr
now the script is OK.
./check_wview.txt
OK - last update was 3.00 seconds ago at 17:35:16 05 janv. 2024|
lastupdate=0.05;30;120 dewpoint=49.6823087947918 rainRate=0
appTemp=67.3970645525476 windchill=67.4003136423159 rain=0
heatindex=66.3327863853724 outHumidity=53.0306676345731
altimeter=29.6960696753803 soilTemp1=66.8762681818182
barometer=29.6316015533198 humidex=69.555285488496
outTemp=67.4003136423159 pressure=27.3071543536385 windGust=0
windrun=0 windSpeed=0 cloudbase=6323.41291818588
Now , I must test the script of Vince.
thank Matthew
Patrick
--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/015ce033-e6db-431e-b63b-7f08cb9291f7n%40googlegroups.com.