Ad Widget

Collapse

Using user macro in http_agent item in header section (API Key)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • freddyd
    Junior Member
    • Dec 2023
    • 10

    #1

    Using user macro in http_agent item in header section (API Key)

    How to use user macro in http_agent item in header section (API Key)?

    Click image for larger version

Name:	image.png
Views:	49
Size:	10.1 KB
ID:	504204

    Click image for larger version

Name:	image.png
Views:	49
Size:	34.8 KB
ID:	504203

    Click image for larger version

Name:	image.png
Views:	79
Size:	35.0 KB
ID:	504202

    If I paste the clear text APIKey which was set also set in user macro before in the "X-..." Header i get the right value from the API.​
  • freddyd
    Junior Member
    • Dec 2023
    • 10

    #2
    Has anybody an idea?

    Comment

    • Markku
      Senior Member
      Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
      • Sep 2018
      • 1781

      #3
      Are you sure that the key is correct and that the header value is in the correct syntax? (I'm not exactly sure what you meant in the copy/paste comment)

      FWIW, I'm using similar setup successfully in my items, in some of my items the header value is "Token {$APITOKEN}" as required by the API.

      Markku
      Last edited by Markku; 02-07-2025, 20:58.

      Comment

      Working...