Ad Widget

Collapse

Zabbix api log in

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ltv
    Junior Member
    • Oct 2015
    • 4

    #1

    Zabbix api log in

    Hi,

    I have a short but (at least for me) hard question.

    Is there a way to use the currently logged in user zabbix user (presumably logged with a cookie/session) for authenticating the zabbix api?

    Thanks
    Last edited by ltv; 13-10-2015, 13:26.
  • timbo
    Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2013
    • 50

    #2
    Hi there,

    Your short question may be a little too short.

    How are you planning on interacting with the API? An external script? Browser Plugin?

    Anyway, you've almost answered your own question. Look in the URL when you've logged into Zabbix, you should see something like this:
    HTML Code:
    http://(IP or DNS Name)/zabbix/dashboard.php?sid=d65bc2142fc18570
    That "sid" (aka Seesion ID) is the API key you need. Obviously the user would need to have API permissions, but I'm going to assume you're aware of that.

    For a little more info, I looked at the API authentication a little in this post:


    Hope this helps!

    -Timbo

    Comment

    • ltv
      Junior Member
      • Oct 2015
      • 4

      #3
      Yes thanks for the help, this must be a step in the right direction!

      I am making a custom dashboard which will replace the standard dashboard.php. So what I did was putting a header redirect at the beginning of the default dashboard.php page to my custom one. I want this custom dashboard to use the session of the user.

      But my knowledge about how Zabbix coded the frontend is very limited. How can I trigger zabbix to send the sid of the user to my custom dashboard?

      Comment

      Working...