Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Welcome to Pandora FMS Community Forums Community support Help with API – Red/Amber/Green output ?

  • Help with API – Red/Amber/Green output ?

    Posted by JonRussell on May 15, 2025 at 16:32

    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

    JonRussell replied 1 month ago 2 Members · 2 Replies
  • 2 Replies
  • Sergio B.

    Administrator
    May 16, 2025 at 09:48
    1514 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hello,

    https://pandorafms.com/manual/!current/en/documentation/pandorafms/technical_reference/02_annex_externalapi

    In this link you have all the possible API calls you can execute within PandoraFMS.

    I believe we don’t have any call for what you’re specifically looking for, but maybe you can find something to workaround.

    Kind regards,

    Sergio B.

  • JonRussell

    Member
    May 16, 2025 at 18:46
    292 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    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.