DX Unified Infrastructure Management

 View Only
  • 1.  Need to monitor bad URLs

    Posted Oct 30, 2017 10:46 AM

    how ca be monitor bad URLs where if url is found then tiger the alarms that should not be monitor for availability, if possible then how to do it ?



  • 2.  Re: Need to monitor bad URLs

    Broadcom Employee
    Posted Oct 30, 2017 04:25 PM

    I would think this would be rather difficult to do.

    I would think to do this centrally you would need to monitor the nas.log with logmon and check for urls that are bad and with watcher profiles and send an alarm based on that.

     

    Nas loglevel would probably need to be left at 3 or higher to get the correct level of detail.

    you would need to make sure url_response, if that is what you are using to monitor url, is sending the url in the alarm message.



  • 3.  Re: Need to monitor bad URLs

    Broadcom Employee
    Posted Oct 30, 2017 09:04 PM

    How about using "curl" with the logmon probe?  The logmon probe can run a command and parse the output.

    For example:

    curl -I http://example.org 2>/dev/null | head -n 1 | cut -d$' ' -f2

    If you google curl and http return code, you will find some sample scripts people wrote.  The logmon probe could run the command and parse the output, then alarm if appropriate.



  • 4.  Re: Need to monitor bad URLs

    Broadcom Employee
    Posted Oct 31, 2017 06:08 AM

    Sample output:  200 = working, anything else....

    [root@LINUXHostname ~]# curl -I http://example.org 2>/dev/null | head -n 1 | cut -d$' ' -f2
    200
    [root@LINUXHostname  ~]# curl -I http://example.org/doesNotExist 2>/dev/null | head -n 1 | cut -d$' ' -f2
    404