16
19.1 Legacy Series / Re: Monit Issue (/usr/local/etc/monitrc:22: syntax error 'failed')
« on: June 25, 2019, 10:33:39 am »
Can you post the monitrc here?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
client: 192.168.20.20:23456 --> firewall: 127.0.0.1:8021
then from
firewall: 10.10.10.11:45678 --> firewall: 10.10.10.11:21
am receiving receiving ICMP success notifications but not failure notifications. There is no problem with standby internet connectivity and it was working previously with "CHANGED STATUS" condition, but now after the upgrade when I put that I get syntax error. Any suggestions?I wonder how that worked because CHANGED STATUS is for program tests.
Here is the alert settings config from the monitrc:Looks fine for me.
set alert abc@gmail.com { icmp,instance } mail-format { Subject:$SERVICE on $HOST $EVENT (ISP LINK STATE CHANGE) } reminder on 10 cycles
And here is the service and service test settings config:
check host ISP-Link-status address xxx.xxx.xxx.xxx
if failed ping then alert
#!/bin/csh
( printf "To: $1\nSubject: Interface Link Down\n\n" ; ifconfig $2 ) | sendmail $1
"Restart" habe ich eh schon eingestellt gehabt!
Ich habe alle Möglichkeiten versucht. mit start stop und sogar bei service test settings execute.
leider funktioniert das alles nicht.
bei start/stop wird immer ein absoluter pfad verlangt. somit fällt "configctl interface linkup start <ALIASNAME>" bei start/stop schon mal weg. per execute im service test settings endet mit "syntax error". tja komisch...dabei hat dieses tool einige Möglichkeiten laut online hilfe.
davon dürfte aber nur sehr wenig davon im tool von opnsense möglich sein. Allein die Einstellung wieviele ping Versuche man machen kann, bis ein Ereignis aussgeführt werden soll, fehlt oder kann ich zumindest nirgends finden. Und das für mich wohl sinnvollste Anwendungsgebiet "ping" -> z.b "3x versucht" -> "error" - "restart Interface igb2" funktioniert anscheinend gar nicht...leider!Na, na, na. Doku nicht gelesen?
Condition: failed ping 3 cycles
im Service Test und die Aktion (in unserem Beispiel 'Restart') wird erst beim 3. Fehler ausgeführt.P.S Übrigens wäre ein Widget sehr wertvoll für ein Monitor Tool.
/etc/rc.d/netif restart <DEVICE>
funktionieren.