Page 1 of 2

Wireless clients HPE

Posted: Tue Sep 20, 2016 4:22 pm
by orani
I have an HPE MSM 720 wireless controller and some MSM466-R APs. Throw the management web interface of the controller i can see how many clients has each AP and some infos such as the ip of the client and the MAC address.

So the question is.... Is there any script for this stuff to get the same infos at nagios?


Thanks in advance

Re: Wireless clients HPE

Posted: Tue Sep 20, 2016 4:28 pm
by rkennedy
Looking at our Exchange, I don't see anything returning for 'HPE' related to network equipment. https://exchange.nagios.org/index.php?o ... chword=hpe

You could write one up yourself, which I don't think would be very difficult as CURL can login / auth to the page if it's just going to be 'basic auth'.

Code: Select all

curl -v 127.0.0.1/nagios/ -u 'nagiosadmin:password'

Code: Select all

*   Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 80 (#0)
* Server auth using Basic with user 'nagiosadmin'
> GET /nagios/ HTTP/1.1
> Host: 127.0.0.1
> Authorization: Basic bmFnaW9zYWRtaW46UGFzc3dvcmQwMQ==
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Tue, 20 Sep 2016 21:25:58 GMT
< Server: Apache/2.4.18 (Ubuntu)
< Vary: Accept-Encoding
< Content-Length: 1097
< Content-Type: text/html; charset=UTF-8
<
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

<html>
<head>
        <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
<script LANGUAGE="javascript">
        var n = Math.round(Math.random() * 10000000000);
        document.write("<title>Nagios Core on " + window.location.hostname + "</title>");
        document.cookie = "NagFormId=" + n.toString(16);
</script>
        <link rel="shortcut icon" href="images/favicon.ico" type="image/ico">
</head>

<frameset cols="180,*" style="border: 0px; framespacing: 0px">
        <frame src="side.php" name="side" frameborder="0" style="">
        <frame src="main.php" name="main" frameborder="0" style="">

        <noframes>
                <!-- This page requires a web browser which supports frames. -->
                <h2>Nagios Core</h2>
                <p align="center">
                        <a href="https://www.nagios.org/">www.nagios.org</a><br>
                        Copyright © 2010-2016 Nagios Core Development Team and Community Contributors.
                        Copyright © 1999-2010 Ethan Galstad<br>
                </p>
                <p>
                        <i>Note: These pages require a browser which supports frames</i>
                </p>
        </noframes>
</frameset>

</html>
* Connection #0 to host 127.0.0.1 left intact
After that, it would just take parsing the data out that you're after and assigning the numbers to variables for Nagios to report.

Re: Wireless clients HPE

Posted: Tue Sep 20, 2016 4:29 pm
by mcapra
It looks as if this device is SNMP enabled. I would suggest running an snmpwalk against the device and seeing what sort of OIDs are currently available.

Here's a reference manual spanning several pages with all the information on the various OIDs:
http://h20565.www2.hpe.com/hpsc/doc/pub ... -c03124006

Re: Wireless clients HPE

Posted: Tue Sep 20, 2016 5:23 pm
by orani
i found something via snmp but i need to add the appropriate mib file. Do you know how can i do this?

Re: Wireless clients HPE

Posted: Tue Sep 20, 2016 5:48 pm
by orani
i found the solution for the mib also but next issue is that when i run check_snmp command from command line i got the result i should but when i am trying to do the same through nagios (define service {...}) at the web interface i am getting "External command error: Error in packet"

Why this happens? what i shoyld do?

Re: Wireless clients HPE

Posted: Tue Sep 20, 2016 6:37 pm
by Box293
Please show us how you are trying to define the service.

Also show us the command you've executed from the command line which works.

Re: Wireless clients HPE

Posted: Tue Sep 20, 2016 8:11 pm
by orani
It worked but not completely. I mean some access points return snmp ok - x(number of clients) and some other "Plugin timed out while executing system call". If i use a mib browser programm the result is fine.

also i want to ask if the result snmp ok - x can be countable i mean that i want for example to get a report and dont show ok, unreachable..... but 1 client,2,3,4...

Re: Wireless clients HPE

Posted: Tue Sep 20, 2016 10:43 pm
by Box293
We can help you with each one of these problems you are having, but we need to see the commands you are trying to execute and what you are trying to achieve with each one, this way we can help get them working.

Re: Wireless clients HPE

Posted: Wed Sep 21, 2016 9:52 am
by orani
define service {
service_description AP-1-Clients
check_command check_snmp!-C 0@5@_P@bl1c -o .1.3.6.1.4.1.8744.5.25.1.2.1.1.9.1.2 -t 30
hosts PRLWAC,RUFWAC,ADMWAC,ANTWAC,ATTWAC,ELNWAC,FILWAC,LIOWAC,RNDWAC,VTNWAC
max_check_attempts 5
check_interval 1
retry_interval 1
check_period 24x7
servicegroups Number of Clients
}

runs fine for alla host at the list exept RUFWAC,ATTWAC,FILWAC

All host has the same configuration

Re: Wireless clients HPE

Posted: Wed Sep 21, 2016 11:45 am
by rkennedy
Your other machines might be timing out, try changing -t 30 to -t 60 - did that help at all?