Ad Widget

Collapse

ubiquiti monitor over http status.cgi

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dtk33d
    Junior Member
    • Aug 2020
    • 6

    #1

    ubiquiti monitor over http status.cgi

    Hello,

    how can i get the values from ubiquiti devices from https://ipaddress/status.cgi


    first lines of status.cgi output:

    { "host": { "uptime": 33818, "time": "2020-10-28 17:25:01", "fwversion": "v6.3.2", "fwprefix": "XW", "hostname": "xxxx", "devmodel": "Rocket M5 ", "netrole": "bridge", "totalram": 63627264, "freeram": 37638144, "cpuload": 13.0, "cputotal": 3381093, "cpubusy": 445570

    thank you
  • dtk33d
    Junior Member
    • Aug 2020
    • 6

    #2
    nobody some idea ?

    Comment

    • poxeron
      Member
      • Sep 2020
      • 52

      #3
      1) snmpv2/snmpv3
      2)https://share.zabbix.com/network_dev...emplate-snmpv2

      Comment

      • dtk33d
        Junior Member
        • Aug 2020
        • 6

        #4
        Hello, thanks for the info, i tried to get some data from:



        if i try in a browser with the above link i can get to the site https://xxx/status.cgi address after entering user and password.

        in zabbix i can only get the following output when i test with the above address:

        HTTP/1.1 200 OK
        Set-Cookie: AIROS_0418D6CC93A4=ad778727a147cd11c296d27190a3133 6; Path=/; Version=1
        Set-Cookie: ui_language=en_US; Path=/; Expires=Tuesday, 1-Jan-38 00:00:00 GMT; HttpOnly
        Content-Type: text/html
        Transfer-Encoding: chunked
        Date: Mon, 02 Nov 2020 13:45:21 GMT
        Server: lighttpd/1.4.39

        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/DTD/loose.dtd">
        <html>
        <head>
        <title>Login</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta http-equiv="Pragma" content="no-cache">
        <meta http-equiv="Expires" content="0">
        <meta http-equiv="Cache-Control" content="no-cache">
        <link rel="shortcut icon" href="/200715.1626/favicon.ico" >
        <link href="/200715.1626/login.css" rel="stylesheet" type="text/css">
        <link href="/200715.1626/style.css" rel="stylesheet" type="text/css">
        <link href="/200715.1626/help.css" rel="stylesheet" type="text/css">
        <script type="text/javascript" language="javascript" src="jsl10n.cgi?l=en_US&v=/200715.1626"></script>
        <script type="text/javascript" src="/200715.1626/js/jquery.js"></script>
        <script type="text/javascript" src="/200715.1626/util.js"></script>
        <script type="text/javascript" src="/200715.1626/index.js"></script>
        <script type="text/javascript" src="/200715.1626/js/jquery.ui.js"></script>
        <script type="text/javascript" language="javascript">
        //<!--
        var globals = {
        first_login : false,
        postback : false,
        fixed : false,
        country : ""
        };

        function onLangChange() {
        $("#lang_changed").val("yes");
        $("#loginform").submit();
        }

        function validateForm() {
        if ($("#lang_changed").val() == "yes")
        return true;

        if ($("#country").val() == "0") {
        $("#errmsg").text("Please select your country.");
        return false;
        }

        if (!$("#agreed").is(":checked")) {
        $("#errmsg").html("To use this product, you must agree to<br>terms of use.");
        return false;
        }

        return true;
        }

        function isMobile() {
        return navigator.userAgent.match(/Android/i) ||
        navigator.userAgent.match(/BlackBerry/i) ||
        navigator.userAgent.match(/iPhone|iPad|iPod/i) ||
        navigator.userAgent.match(/Opera Mini/i) ||
        navigator.userAgent.match(/IEMobile/i);
        }

        $(document).ready(function() {
        $("#username").focus();
        cache_images([
        'main_top.png', 'main.png', 'link.png',
        'net.png', '4dv.png', 'srv.png',
        'system.png', 'border.gif', 'spectr.gif']);

        if (globals.first_login) {
        $("#ui_language").change(onLangChange);
        $("#loginform").submit(validateForm);
        if (!globals.postback && !globals.fixed)
        $("#country").val(0);
        else
        $("#country").val(globals.country);
        }

        if (isMobile() || $('.first_login').length) {
        $('.desktopView').addClass("initial_hide");
        $('.mobileView').removeClass("initial_hide");
        } else {
        $('.mobileView').addClass("initial_hide");
        $('.desktopView').removeClass("initial_hide");
        }
        });
        //-->
        </script>
        </head>

        <body class="">
        <table border="0" cellpadding="0" cellspacing="0" align="center" class="loginsubtable">
        <form enctype="multipart/form-data" id="loginform" method="post" action="/login.cgi">
        <tr>
        <td valign="top"><img src="/200715.1626/images/airos_logo.png"></td>
        <td class="loginsep">
        <input type="hidden" name="uri" id="uri" value="/status.cgi" />
        <table border="0" cellpadding="0" cellspacing="0" class="logintable" align="center">
        <tr>
        <td colspan="2" align="center">
        <div id="errmsg" class="error">

        </div>
        </td>
        </tr>
        <tr>
        <td colspan="2">&nbsp;</td>
        </tr>
        <tr>
        <td><label for="username">User Name:</label></td>
        <td><input class="config" type="text" name="username" id="username"/></td>
        </tr>
        <tr>
        <td><label for="password">Password:</label></td>
        <td><input class="config" type="password" name="password" id="password"/></td>
        </tr>

        <tr>
        <td colspan="2">&nbsp;</td>
        </tr>
        </table>
        </td>
        </tr>



        <tr>
        <td colspan="2" class="submit" align="right">
        <input type="submit" value="Login" />
        </td>
        </tr>
        </form>
        </table>
        <footer class="footer">
        <div class="umobileSection">
        <div class="mobileView">
        <img class="umobile" src="/200715.1626/images/unms.svg">&nbsp;
        <div class="umobileApp">
        <div class="umobileAppText">Have a SmartPhone? Try our new UNMS to install this device</div>
        </div>
        <a href="https://play.google.com/store/apps/details?id=com.ubnt.umobile">
        <img class="badge" src="/200715.1626/images/astore.svg" alt="AppleStore"></a>
        </div>
        <div class="desktopView">
        <a target="_blank" href="https://www.ubnt.com/software/">
        <img class="logos" src="/images/login-logos.svg">
        </a>
        </div>
        </div>
        </footer>
        </body>
        </html>


        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #5
          Item with type "http item" for main data (retrieve all output from that URL). Then dependent items (with required preprocessing) for each needed parameter.
          Quite a textbook (reading manual) example...

          https://www.zabbix.com/documentation...itemtypes/http
          https://www.zabbix.com/documentation...ependent_items

          Comment

          Working...