Community discussions

 
User avatar
doneware
Trainer
Trainer
Topic Author
Posts: 418
Joined: Mon Oct 08, 2012 8:39 pm
Location: Hungary

feature request: expose variables to netwatch scripts

Thu Jun 14, 2018 6:48 pm

it is cool to have scripting hooks in netwatch, like up-/down-script.

it would be however much more pleasant to have some variables exposed to the scripts, like
  • host
  • since (this time the timestamp of the last change, not the one that has fired the script)
  • routing-mark (which then implies the usage of in-vrf monitoring)
  • comment (to be able to add some unique identifier as well)
this way we could re-use scripts for multiple different netwatch entries.

and ability to specify the source-interface/source-ip-address.
and maybe to add some grace cycles, like x consecutive misses fire the down event, instead of a single one.
#TR0359
 
User avatar
Cha0s
Forum Veteran
Forum Veteran
Posts: 779
Joined: Tue Oct 11, 2005 4:53 pm

Re: feature request: expose variables to netwatch scripts

Fri Jun 15, 2018 2:14 pm

+1 :)
 
pe1chl
Forum Guru
Forum Guru
Posts: 4565
Joined: Mon Jun 08, 2015 12:09 pm

Re: feature request: expose variables to netwatch scripts

Fri Jun 15, 2018 4:42 pm

When you want to setup a complicated monitoring system that performs actions when reachability changes, it is better to avoid netwatch.
Not only is it limited by the recent changes to scripting policy, but also it has always had the problem that a single missed ping indicates a "down" condition.
(there is no way to specify a number of missed pings)
This tends to lead to false alarms in the presence of some packet loss, which could occur when lines are fully loaded etc.

It is probably better to make a script that itself contains a loop or is scheduled frequently for a single pass, and that uses other primitives
like /ping and /tool fetch etc to monitor. This allows you to set thresholds and also solves the problem you have with netwatch.
 
User avatar
doneware
Trainer
Trainer
Topic Author
Posts: 418
Joined: Mon Oct 08, 2012 8:39 pm
Location: Hungary

Re: feature request: expose variables to netwatch scripts

Fri Jun 15, 2018 8:13 pm

Not only is it limited by the recent changes to scripting policy, but also it has always had the problem that a single missed ping indicates a "down" condition.
(there is no way to specify a number of missed pings)
this is the reason why i asked for this as well:
and maybe to add some grace cycles, like x consecutive misses fire the down event, instead of a single one.
#TR0359
 
User avatar
doneware
Trainer
Trainer
Topic Author
Posts: 418
Joined: Mon Oct 08, 2012 8:39 pm
Location: Hungary

Re: feature request: expose variables to netwatch scripts

Fri Jun 15, 2018 8:17 pm

like /ping and /tool fetch etc to monitor. This allows you to set thresholds and also solves the problem you have with netwatch.
/ping is also a nice stuff to have, but currently it is lacking some serious functionality. it should be able to return at least the same output when run "as-value" as normally.
sadly it just returns the number of packets successfully received. at least the min/max/avg RTT would be fine. the success rate i can calculate by myself :-)

otoh i also asked for this some time ago:
viewtopic.php?f=1&t=45934&start=750#p665235

but hell, i'll do this right away as a standalone topic :-)
#TR0359
 
User avatar
cgood
just joined
Posts: 15
Joined: Sat May 31, 2014 4:01 pm
Location: Russia, Sochi
Contact:

Re: feature request: expose variables to netwatch scripts

Tue Jul 31, 2018 12:11 am

+1 vrf must have
 
User avatar
Jotne
Member
Member
Posts: 321
Joined: Sat Dec 24, 2016 11:17 am

Re: feature request: expose variables to netwatch scripts

Tue Jul 31, 2018 8:29 am

You could use Splunk/syslog for some of these.

If you send these log message to an external syslog server, it will on the server show
What IP it come from
What time it arrived
Message you chose to send.

Then you could make a graphical dashboard showing you when link goes up/down.
If Syslog server is on Lan side, you get bot up and down message.
If Syslog are on the Wan side and you monitoring Wan side, it will only show when it goes up.
 
User avatar
doneware
Trainer
Trainer
Topic Author
Posts: 418
Joined: Mon Oct 08, 2012 8:39 pm
Location: Hungary

Re: feature request: expose variables to netwatch scripts

Fri Aug 03, 2018 3:56 pm

You could use Splunk/syslog for some of these.
Then you could make a graphical dashboard showing you when link goes up/down.
If Syslog server is on Lan side, you get bot up and down message.
If Syslog are on the Wan side and you monitoring Wan side, it will only show when it goes up.
i don't want to have external tools for this - i want to do it in the device. and definitely i don't want to create up/down scripts with _individual_ log generation commands.
if i can get access to object metadata as variables, then it is up to me, whether i want to rely on syslog as a shim layer towards out of the box logic, or solve/remediate my issues in the device.
cause netwatch down events can be triggered by interruptions that leave your device incapacitated to communicate to external (central) control elements. and in many cases, the "LAN" is not yours, esp. in the SP environment :-)
#TR0359

Who is online

Users browsing this forum: No registered users and 4 guests