Ad Widget

Collapse

How to update items through API (without Zabbix Agent)?

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kbencze95
    Junior Member
    • Feb 2021
    • 18

    #1

    How to update items through API (without Zabbix Agent)?

    Hello, and thank you for taking the time to read my issue.

    I have a task, which is to create items for some hosts, and update those items' value via API POST calls ( or any other way), WITHOUT installing Zabbix agent on the hosts.

    So I am developing an application which sends API requests to my Zabbix server, but in the documentation I noticed that, the "item.update" method (https://www.zabbix.com/documentation...ce/item/update) gives no way to update the value of the item. The parameter "lastvalue" is readonly, so the calls I make do not change its value.

    Is there a way around this? Is there another way to make items for hosts, which could be changed via API POST calls? Or any other way to change these values without Zabbix Agent?

    Thanks in advance,
    Bless your heart for reading all this,
    Bence K.
  • Answer selected by kbencze95 at 15-04-2024, 20:41.
    cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4853

    API is not for submitting data. It is for configurations... If agent is out of the question, then maybe zabbix_sender? it is a tiny binary and could be also just a standalone, without any installations procedures...

    Comment


    • kbencze95
      kbencze95 commented
      Editing a comment
      Thank you, that sounds like something I can work with. Do you happen to know where I can download this tiny binary? For Windows
      Last edited by kbencze95; 17-05-2022, 13:16.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4853

    #2
    API is not for submitting data. It is for configurations... If agent is out of the question, then maybe zabbix_sender? it is a tiny binary and could be also just a standalone, without any installations procedures...

    Comment


    • kbencze95
      kbencze95 commented
      Editing a comment
      Thank you, that sounds like something I can work with. Do you happen to know where I can download this tiny binary? For Windows
      Last edited by kbencze95; 17-05-2022, 13:16.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4853

    #3
    For windows, it is part of agent installation, so unpack it

    Or any other version, https://www.zabbix.com/download_agents

    Comment

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

      #4
      So I am developing an application which sends API requests to my Zabbix server
      Note that you can also leverage any existing library for Zabbix sender/trapper (like zbxsend or py-zabbix for Python), or write your own calls if you like, based on the documentation:

      https://www.zabbix.com/documentation.../items/trapper

      Markku
      Last edited by Markku; 18-05-2022, 16:55. Reason: Pyzabbix doesn't have the sender, replaced with zbxsend

      Comment

      Working...