Browse Source

corrected trunked DNS-RBL example

Volker Tanger 4 months ago
parent
commit
d89e207ee6
2 changed files with 10 additions and 6 deletions
  1. 5 1
      history.txt
  2. 5 5
      moshel.example

+ 5 - 1
history.txt

@@ -66,10 +66,14 @@ wanted checks (examples)
 
 ------------------------------------------------------------------------
 
+2024-05-28
+    Volker Tanger <volker.tanger@wyae.de>
+	* bugfix: stabilized OpenDTU + Shelly queries (longer timeout, retries)
+	
 2024-05-16
     Volker Tanger <volker.tanger@wyae.de>
 	* feature: added OpenDTU to example 
-	  (solar generation readout for HoyMiles micro-inverters)
+	  (solar generation readout for Hoymiles micro-inverters)
 	
 2024-05-08
     Volker Tanger <volker.tanger@wyae.de>

+ 5 - 5
moshel.example

@@ -116,7 +116,7 @@ Category "DNS+RBL checks"
 # you are on an RBL if Reversed IP + RBL-URL yield 127.0.0.*
 # here mail.wyae.de = 90.187.34.181
 #
-for RBL in zen.spamhaus.org cbl.abuseat.org  virbl.dnsbl.bit.nl  dnsbl.inps.de ix.dnsbl.manitu.net no-more-funn.moensted.dk c$
+for RBL in zen.spamhaus.org cbl.abuseat.org  virbl.dnsbl.bit.nl  dnsbl.inps.de ix.dnsbl.manitu.net no-more-funn.moensted.dk combined.njabl.org dnsbl.njabl.org bl.spamcannibal.org bl.spamcop.net dnsbl-1.uceprotect.net dsn.rfc-ignorant.org postmaster.rfc-ignorant.org bogusmx.rfc-ignorant.org; do
     CheckCountLessThan RBL_$RBL "dig +short 181.34.187.90.$RBL" '/127.0./{print $0}' 1 "Mailserver steht auf RBL $RBL"
 done
 CheckCountMoreThan DNS_mail.wyae.de_Provider "dig +short mail.wyae.de" '/90.187.34.181/{print $0}' 0 "Mailserver DNS beim Provider unbekannt"
@@ -195,17 +195,17 @@ CheckValueUnder AirHumidity "cat $FN" '$0' 100 'Sensor broken?'
 
 # retrieve power usage/solar generation from an OpenDTU
 #-- *old* OpenDTU v24.1.26
-curl --max-time 5 -s http://IPADDRESS/api/livedata/status | jq .inverters[0].AC.\"0\".Power.v | cut -d '.' -f 1 > $FN
+curl --retry-max-time 9 --retry 2 -s http://IPADDRESS/api/livedata/status | jq .inverters[0].AC.\"0\".Power.v | cut -d '.' -f 1 > $FN
 #-- after OpenDTU v24.2.12
-curl --max-time 5 -s http://IPADDRESS/api/livedata/status | jq .total.Power.v | cut -d '.' -f 1 > $FN
+curl --retry-max-time 9 --retry 2 -s http://IPADDRESS/api/livedata/status | jq .total.Power.v | cut -d '.' -f 1 > $FN
 CheckValueUnder Solarstrom-OpenDTU "cat $FN" '{ print $0 }' 800 'Solar generation above 800W'
 
 # retrieve power usage/solar generation from a Shelly (Gen1-API)
-curl --max-time 5 -s -u USER:PASSWORD --basic http://IPADDRESS/status | jq '.meters[0].power' > $FN
+curl --retry-max-time 9 --retry 2 -s -u USER:PASSWORD --basic http://IPADDRESS/status | jq '.meters[0].power' > $FN
 CheckValueUnder Solarstrom-Shelly1pm "cat $FN" '{ print $0 }' 800 'Solar generation above 800W'
 
 # retrieve power usage/solar generation from a ShellyPlugS (Gen2-API)
-curl --max-time 5 -s -u USER:PASSWORD --anyauth 'http://IPADDRESS/rpc/Switch.GetStatus?id=0' | jq .apower > $FN
+curl --retry-max-time 9 --retry 2 -s -u USER:PASSWORD --anyauth 'http://IPADDRESS/rpc/Switch.GetStatus?id=0' | jq .apower > $FN
 CheckValueUnder Solarstrom-ShellyPlugS "cat $FN" '{ print $0 }' 800 'Solar generation above 800W'
 
 rm $FN