Ad Widget

Collapse

monitor loginsight api

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • melv1n
    Junior Member
    • Apr 2023
    • 2

    #1

    monitor loginsight api

    Hi, firstly sorry for my english ( :

    I do this post because i have issue with zabbix, i want get json from LogInsight API for configure trigger alert.

    I have installed zabbix with docker <- version 16.0.3

    I have created one host named loginsight, one items call getAlerts and one discovery rule named getAuth.

    My getAlerts item send HTTP requests to the api of loginsight but need a baerer tokens generated by loginsight as random sessionId with ttl.
    With my discovery rule i do request to the loginsight api for get this random sessionId.

    I receive this:
    {"userId":"my-user-id","sessionId":"my-session-id","ttl":1800}

    I have tried to get sessionId with LLD Macro.

    {#TOKEN} -> $.sessionId.

    but the test return me all the json.

    So i have two question:

    I'm in good ways for do i want ?
    What is wrong with my lld macro ?

    Thanks you
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    You may use script item (javascript) https://www.zabbix.com/documentation...emtypes/script
    In one script, you can request a token and use it​

    Comment

    • melv1n
      Junior Member
      • Apr 2023
      • 2

      #3
      Hi thanks you for this reponse !

      That work.

      Melv1n

      Comment

      Working...