Forum Discussion

mnagel's avatar
mnagel
Icon for Professor rankProfessor
7 years ago

netflow data access via API

Among other reasons, it would be very desirable to have access to Netflow data via the API for at least these reasons:

* detect missing netflow data due to misconfiguration or similar; this includes both persistent lack of data and data gaps
* detect and alert on unusual traffic in a customized manner

Missing data without awareness is probably the single biggest weakness in LM, and with Netflow there is literally nothing that can be done short of visual inspection of every device in the UI.

Thanks,
Mark

 

  • Forgot to include the headers I was referring to:

    Accept: application/json, text/javascript, */*; q=0.01
    Accept-Language: en-US,en;q=0.9
    Accept-Encoding: gzip, deflate, br
    Accept-Charset: utf-8, iso-8859-1;q=0.5 

  • I have been given a tentative fix, will post if I get it working...

  • 2 hours ago, mnagel said:

    OK -- under control for now.  DISCLAIMER: everything is subject to change, as it was before when accessing undocumented REST resources.

    The short answer is you must now include an 'X-version: 2' header in your request headers, or add 'v=2' as a query param.  When you do this, it is supposed to work for any endpoint except one (can't recall which), but I updated my module to use v2 only as needed for specific endpoint patterns. 

    The other important finding is that the data structure returned for the v2 API is different.  Instead of items being a subkey of data, it is (for now anyway) a top-level key.  I also had been checking the status key (copy of the HTTP response code), but that was removed. 

    I am still working on updates to my scripts, but the netflow script is working again.  I will post my revised LMAPI.pm to github when it is stable.

    Updated WM::LMAPI.pm at https://github.com/willingminds/lmapi-scripts.git -- still working on more issues, but this handles most of my pain.

  • Sarah_Terry's avatar
    Sarah_Terry
    Icon for Product Manager rankProduct Manager

    @Mosh @mnagel We will publish the ability to get netflow data with v2 of the API, which is coming soon. v2 is not quite ready to be published yet, so use it with caution until it's officially published (it is subject to change), but we should be ready in the next couple of releases - stay tuned!

  • Hi,  I am a new user to Logic Monitor - and this thread caught my attention.

    Yes - Knowing when Netflow suddenly stops being received - which implies stops being sent.
    Yes - it would be very nice to know this sooner rather than later.

    Did you get your API working with the new version?

    This post is 2+ years old - I hope you have made process getting this monitored.