Ad Widget

Collapse

Programmatically set manual state

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fredrik
    Junior Member
    • May 2016
    • 3

    #1

    Programmatically set manual state

    Hello!
    I'm making a web page for controlling several items, and as we use Zabbix I'm now trying to programmatically read and write data from my page.

    I'm not very familiar with Zabbix, but it goes quite well for me to use the API in order to show all IT services in a neat list or table, and also to change name, algorithm or parent nodes if I wanted to do that, but my issue is that I want to change the manual state. I get it in a variable (manualstate) for each service when I ask Zabbix to send all IT Services from the Zabbix API, but I really can't figure out how to change it. It is so easy to do at the Zabbix GUI, just click at a status in the IT Services and then just select a status. But... how do I accomplish that with the Zabbix API?



    Best regards
    Fredrik Öhrström
  • jan.garaj
    Senior Member
    Zabbix Certified Specialist
    • Jan 2010
    • 506

    #2
    I'm still not sure what is "manualstate"? I don't see it in API manual or IT services doc:



    Which Zabbix version are you running?
    Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
    My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

    Comment

    • Fredrik
      Junior Member
      • May 2016
      • 3

      #3
      Maybe this is a patched Zabbix?

      Thanks for your attention !
      You may be rigiht that it may be the version. I haven't got the most recent version. I've got 2.2.

      But it doesn't say anything about the manualstate in the docs either. Still I find it. I get it from the API when I call for IT Services, and I also get a GUI where I can edit it. I get a drop down when I left click the Status column in the IT Services list. The drop down says:
      Set manual status
      Automatic
      Ok
      Info
      Warning
      Average
      Error
      Disaster

      Perhaps I have a patched Zabbix if this ain't nothing you recognise?

      /Fredrik

      Comment

      • Fredrik
        Junior Member
        • May 2016
        • 3

        #4
        Thanks!

        Hi again!
        Yes, it's made here, at my workplace. Just got it confirmed.
        Your response got me on track.

        The idea is quite straightforward. Given a service, with a bunch of childservices, one may want to set a manual state at it to make it tell that it's ok and stop disturbing with an error if the user knows it's ok... or the other way around. It's quite helpful.

        Thanks again!
        /Fredrik

        Comment

        Working...