Hi there!
Iam trying to make a simple event:
1) RPM pings a destination IP
2) Event ping_test_fail and trigger an interface down command
I made this work with RPM, EVENT + EVENT SCRIPT called disable-interface.slax and it worked well.
But after that i realised there are options for executing commands directly in event-option subcommand without using the external script. This is my current (non script) configuration:
set services rpm probe icmp-ping-probe test ping-probe-test probe-type icmp-ping
set services rpm probe icmp-ping-probe test ping-probe-test target address 40.0.0.1
set services rpm probe icmp-ping-probe test ping-probe-test test-interval 5
set event-options policy PING_FAIL events ping_test_failed
set event-options policy PING_FAIL within 1 trigger on
set event-options policy PING_FAIL within 1 trigger 1
set event-options policy PING_FAIL then execute-commands commands configure (*tried without this command)
set event-options policy PING_FAIL then execute-commands commands "set interfaces ae0 disable"
set event-options policy PING_FAIL then execute-commands commands commit (*tried without this command)
set event-options policy PING_FAIL then execute-commands user-name root
It doesn't work. RPM service indicates that probes are down but the configuration isnt submitting (nothing happens)
I need to execute many commands in future and I really dont wanna use script for that, if its a build-in option.
Any ideas?
Huge thanks! 🙂
Roma