slauger/check_netscaler

interface support

Closed this issue · 2 comments

Hey,

I think we see the samme issues on /stat/interface like we did on /stat/nspartition
When polling for performance data like;
/home/user/check_netscaler.pl -t 1 -C perfdata -u nsroot -p password -s -H hostname -v -o interface -n errdroppedrxpkts -v

I get:
$VAR1 = '{ "errorcode": 0, "message": "Done", "severity": "NONE", "Interface": [ { "id": "10\/1", "curintfstate": "UP", "curlinkuptime": "209.11:10:58", "curlinkdowntime": "00:00:00", "totrxbytes": "1705768467627", "rxbytesrate": 506275, "tottxbytes": "1764413027029", "txbytesrate": 547663, "totrxpkts": "2994048284", "rxpktsrate": 727, "tottxpkts": "3352305004", "txpktsrate": 828, "jumbopktsreceived": "0", "jumbopktsreceivedrate": 0, "jumbopktstransmitted": "0", "jumbopktstransmittedrate": 0, "trun......
NetScaler UNKNOWN - perfdata: unable to parse data. Returned data is not a HASH or ARRAY!

not sure if it is the same issue or because interface names are 10/1 - note the /

stat/interface is important to monitor (totrxpkts,errdroppedrxpkts) because of the packets per second assigment to a VPX from SDX.

Best regards,
Henrik

Nevermind! - There is a difference polling interface and Interface........

The NITRO api is really weird sometimes. The command interfaces already takes care of that behavior. See

foreach my $interface ( @{ $response->{'Interface'} } ) {