In the wake of the article from Ilya ( ableev ) I want to talk about a different approach for notifications from the Zabbix monitoring system on the desktop. For the last 3 months I have been using the zabbix vue browser extension . From me, only a translation into Russian flew into this project, so this is not an advertisement, an extension for free, no bookmarks or anything else (at the end of the article there will be a link to the githab of this extension). The extension is for chrome-like browsers and firefox. Unlike the solutions presented in the Badoo article, browser extensions work on all Linux, Mac, Windows and even exotic ChromOS. A small comparison under the cut.
This is how all the extension settings look. You do not need to do anything on the server side, you specify the server address, login, password and everything, notifications start to fall. Unlike solutions that are presented in another article, the setup is simplified as much as possible. Button to check the correctness of the specified data in the form of a "refresh" symbol. There are also additional filters (for example, by the level of importance) for setting which triggers to show, so as not to clutter up all with notifications. From the minuses, I can immediately notice that chrome does not synchronize the parameters of extensions, so that you have to manually configure each time on several computers or when reinstalling the OS. Well, the interface in the extension and its settings are not aesthetically pleasing to me.
I can not fail to notice one important nuance. In the extension, you can add more than one zabbiks server to receive notifications and view problems. Hello bad, and organizations to outsourcers, well, to all others who have more than one server.
For chrome, there is a setting in the flags which type of notification to use - built in chrome or system for your OS. Well, in chrome, there is also a setting for background processes, which allows extensions to work even with the browser window closed.
The essence of the extension is simple, it knocks on api in zabbiks and takes data, it skips all displayed notifications and displays new ones. Let me remind you that for users you can limit the hosts and groups of hosts that they can see in zabbiks. Thereby, separation of rights is achieved. In alternative ways, you need to create an action that will pull some script on the zabbiks server so that it in some way sends a notification to the application that you have. The division of rights is, of course, dubious, in this I support Illya, but I would not, without a weighty advantage, refuse this functionality. Well, with abundant use of api, it seriously loads the database. Against the background of heavy loads of not very high-speed api, the use of browser expansion also raises the question of expediency, instead of such quite good, but more complex solutions that Ilya presented.
When discussing this extension in the Russian telegram channel on zabbiksu, someone noticed that in the audit constant messages about the login are generated, and this is actually terrible. After a brief investigation, the culprit was found, this is a zabbix-notifier from gigacom. Also browser extensions, but only for chrome. The essence of the problem is as follows: during authorization by api, your action is recorded in the audit log in zabbiks, and the extension from gigacom did not use the token received during the first authorization, but simply logged in all the time, which, in fact, blocked the audit log. Zabbix vue, when re-accessed, constantly uses the token, until it gets rotten (determined by the response from the API). If the token is rotten, then it makes the relogin and so on in a circle.
Firefox extension
Chrome extension
Zabbix Share page
Github repository extensions.
Source: https://habr.com/ru/post/418957/
All Articles