Hit Zabbix API (1.8, 2.0)

I'm not sure if I want to evaluate or criticize it.

What is Zabbix API

Most of the work that can be done on the Web can be done programmatically.

However, not all can be done.

Web items cannot be deleted via the Zabbix API.

Web items are like this (although I haven't researched them yet) https://www.zabbix.com/documentation/2.0/manual/web_monitoring/items

Basically, it seems that the lowest line is that you can add hosts and items for monitoring around numerical values, and you can do that. It seems that it is impossible to steal the UI like a widget gadget.

document

Click here for the official

Here is the stray

At first glance it seems easy. However, the corner case hurts my head a little.

Basically

Exchange with JSON.

It's simple. Of course, JSON runs around the traffic live, so it may be better to make https mandatory in production.

In addition, it is troublesome to build that JSON, so there is a library as it is. In Python, I ported Zabbix API, which is about Ruby. __ Well __

https://github.com/gescheit/scripts/tree/master/zabbix

No, it was mentioned that there are no major ones on the introduction site, and that multiple Zabbix APIs are called. It doesn't seem to be a package level.

Oh, I got a typo

Problems encountered

It is the end of the branches and leaves.

That said, 1.8 is currently in stable use, so you can expect the API to work reasonably well. It's good!

Specifically, this is the problem

Postscript: I found this. An example in which the document says that boolean is accepted, but the actual situation is 1/0. It is expected that there are quite a few bugs like this. http://www.zabbix.jp/node/2261

I published an example

https://github.com/dmiyakawa/zabbix_api_examples

I would like to call it a general-purpose library, but first of all, since the main tool is very flexible, there is no point in generalizing it unless the direction is clear, and it is suspicious that there are parts where the architecture is different between 1.8 and 2.0. It seems to be quite difficult considering that the error message, which seems to be the only source of information at the time of the error, is broken at the end. The Zabbix API (Ruby?) Guy is good enough in that sense. There is no point in hiding it anymore. interfaceid or something annoying

Is it better to think of an abstraction level that suits your purpose? Also, I think it's good to have know-how about what individual error messages can actually mean.

Recommended Posts

Hit Zabbix API (1.8, 2.0)
Hit Mastodon's API in Python
Get information with zabbix api
Zabbix API this and that
Understand how Zabbix API works
Hit the Sesami API in Python
[Python] Hit the Google Translation API
Hit the Etherpad-lite API with Python
Hit the web API in Python
Hit ISE's ERS API with PowerShell
Hit the Web API using requests Example: Flickr
Hit the Firebase Dynamic Links API in Python