/zabbix-hostmenu

Patch to view and use URL_* fields from host's Inventory in Host context menu. Most of {HOST.* and all of {INVENTORY.* macros are supported

Primary LanguageJavaScript

zabbix-hostmenu

Overview

This is the frontend JS patch that allows to:

  • add additional External or internal URLs to Host Menu everywhere in the Zabbix Frontend
  • (NEW) automatically add direct links to related and in-context graphs in trigger popup menu if any

Trigger menu Features (links to graphs)

By default in Zabbix only links to simple graphs are available. This patch adds links to more interesting looking graphs as well if any.

  1. Patch will automatically add links to related graphs in trigger popup menu if any (Problems, Events and Triggers zabbix sections)
  2. Tested in Zabbix 2.4, 3.0 and 3.2
  3. Zero configuration

Trigger menu Example

image
And one more sample:
image and you are here:
image

Host menu Features

  1. Use host's URL_A, URL_B, URL_C Inventory fields
  2. Macros {HOST.ID}, {HOST.HOST}, {HOST.NAME}, {HOST.CONN} and {INTENVORY.*} can be used in URLs
  3. Add a name to URL link like so: Google|http://google.com
  4. Tested in Zabbix 2.4, 3.0 and 3.2

Host menu Example

  1. Fill in inventory fiels:
    image

  2. Use it on the Dashboard or anywhere else (except for map):
    image

  3. Hosts without URL_* inventory fields stay clean: image

Install

Change current folder to root of zabbix frontend: Then run:

[user@centos zabbix]$ sudo patch -p1  -i zabbix-hostmenu.diff 
patching file js/init.js
patching file js/menupopup.js

You are done.

Known issues

  1. This patch adds extra JSON API Call, so menu is a bit slower than before.

TODO

  1. Make sure that {HOST.IP} and {HOST.CONN} always return main interface
  2. Remove possible race condition for RPC object (find a way to clone RPC object, help appreciated)
  3. Extend functionality to Map context menu

More info and help

You may vote for this kind of functionality included in Zabbix itself if you found this useful: https://support.zabbix.com/browse/ZBXNEXT-3496