Random Project

Hidden lbvserver down

Hi Slauger, thank you for this script. It works very well and most important, it works fast 🙂
We have a problem with applying the regex filter. Can you help us with an example perhaps?

[root@server /usr/local/nagios/libexec]$ ./check_netscaler.pl -H 1.2.3.4 -u username -p password -s -C state -o lbvserver
NetScaler CRITICAL – state lbvserver: _httpredir_ DOWN; | UNKOWN=0;;;0; UP=28;;;0; ‘OUT OF SERVICE’=0;;;0; DOWN=1;;;0;

This is a hidden vServer which is apparently down by default and created by the NetScaler when the option “Redirect From Port” is used. The vServer in our case is listening on port 80 to redirect to 443. Since this is by design, we would like to add a filter to the check comment to ignore vServers which have _httpredir_ in the name.

I tried to add various things like this, but that didn’t work unfortunately:
-f ‘/(?:[^*_httpredir_*]*)/’

Hope you can help us with a regex example.
Dennis