Pandora FMS Community

Help with API - Red/Amber/Green output ?

JonRussell · 15 may 2025, 16:32 · 3 mensajes · 127 visitas

  1. Inicio del debate

    Hi.

    I want to query the Pandora FMS API, and get back some kind of status based on Red / Amber / Green

    Currently, I keep an eye on the Agent Details page in the console, filtered by “Status Not Normal”.

    I want to get some kind of summary using the API? Can someone point me to an example, or the correct API to use?

    I want to build a traffic light output. If there are any red agents, the output is red. If there are no red, and some amber, the output is amber, and if everything is normal, the output is green.

    Is that possible with the API to get the Agent Details output and then filter it?

    Can anyone point me to some example code?

    Although I’ve been using Pandora for many years, I’ve never used the API.

    Thanks

  2. Hi. Thanks for the reply.

    I got ChatGPT to help, and eventually got a working solution, using the v1 API.

    I used the "tactical_view" API, which contains "monitor_critical" & "monitor_warning" totals, and I use that to work out if I'm Red, Amber or Green.

    The v2 API does not have the right API methods to do what I need. I assume more API end points will be released over time, before the v1 API is retired?

    The forum wont let me post the code. If anyone wants it, just DM me.

    Thanks.

Entra en tu cuenta para publicar.