{"__v":23,"_id":"562ea6c53b2af20d006ad03d","category":{"__v":4,"_id":"55d3b645f77e6d0d00b1b27c","pages":["55d3b647f77e6d0d00b1b286","55d3b647f77e6d0d00b1b287","55d3b647f77e6d0d00b1b288","55d3b647f77e6d0d00b1b289","55d3b647f77e6d0d00b1b28a","55d3b647f77e6d0d00b1b28b","55d3b647f77e6d0d00b1b28c","55d3b647f77e6d0d00b1b28d","55d3b647f77e6d0d00b1b28e","55d3b647f77e6d0d00b1b28f","55d3b647f77e6d0d00b1b290","55d3b647f77e6d0d00b1b291","562ea6c53b2af20d006ad03d","56312e4024014b0d00bd9a48","564e4d122b223c2b00496a27"],"project":"55c505b41469ad2500fa2ab7","version":"55d3b644f77e6d0d00b1b273","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-08-10T18:45:23.276Z","from_sync":false,"order":9,"slug":"integration-guides","title":"Integration Guides"},"parentDoc":null,"project":"55c505b41469ad2500fa2ab7","user":"55c50f4a7c199a2f00665cbf","version":{"__v":5,"_id":"55d3b644f77e6d0d00b1b273","project":"55c505b41469ad2500fa2ab7","createdAt":"2015-08-18T22:48:36.632Z","releaseDate":"2015-08-18T22:48:36.632Z","categories":["55d3b645f77e6d0d00b1b274","55d3b645f77e6d0d00b1b275","55d3b645f77e6d0d00b1b276","55d3b645f77e6d0d00b1b277","55d3b645f77e6d0d00b1b278","55d3b645f77e6d0d00b1b279","55d3b645f77e6d0d00b1b27a","55d3b645f77e6d0d00b1b27b","55d3b645f77e6d0d00b1b27c","55d3b645f77e6d0d00b1b27d","55d7c2939510f00d007ec6fe","56fac9925df15a20002972a2","56fb2f7668e1d30e00a0b672","583498d411e8af2500f6b334"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.1.0","version":"1.1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-10-26T22:18:45.629Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":11,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"For PagerDuty + Zabbix users\",\n  \"body\": \"If you are pushing your Zabbix alerts to PagerDuty, Neptune.io will receive from PagerDuty so directly go to PagerDuty integration.\"\n}\n[/block]\nThese are the steps for integrating Zabbix directly with Neptune.io.\n\n## Step 1: Download the required python script from Github.\nDownload `notify_neptuneio_zabbix.py` from Github and copy it to the directory which contains the alert scripts (e.g, `/etc/zabbix/alert.d/` but this might be different based on Zabbix version you are using).\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"wget https://raw.githubusercontent.com/neptuneio/zabbix-integration/master/notify_neptuneio_zabbix.py\\n\\ncp notify_neptuneio_zabbix.py /etc/zabbix/alert.d/\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n## Step 2: Make sure the script is executable by Zabbix.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"chmod 755 /etc/zabbix/alert.d/notify_neptuneio_zabbix.py\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n# Do the following steps from your Zabbix portal.\n## Step 3: Create Neptune Mediatype\n\nIn Zabbix portal go to Administration -> Mediatypes and add a new Mediatype with name \"Neptune\" and type: \"script\" and give `notify_neptuneio_zabbix.py` as the script name. \n\nDo not forget to select enable before clicking add.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ypt6MmP3QFONEgFeUTfJ_Zabbix_add_media.png\",\n        \"Zabbix_add_media.png\",\n        \"737\",\n        \"278\",\n        \"#526ea2\",\n        \"\"\n      ],\n      \"caption\": \"Adding media type in Zabbix.\"\n    }\n  ]\n}\n[/block]\n## Step 4: Add media type to a user.\n\nAdd Neptune media type to either an existing user or a new user. This user need not have admin privileges.\n1) Go to Administration->users  and select user view in the selection box on the right side of   the page.  \n2) Select on the user you want to add the media to.\n3) In Media tab click add Media and select type as Neptune, fill Neptune_api_key in send_to \nfield and active as 1-7,00:00-24:00\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/MzrslyGTzglW68UG4wfw_Add_Media.png\",\n        \"Add_Media.png\",\n        \"1163\",\n        \"412\",\n        \"#516da0\",\n        \"\"\n      ],\n      \"caption\": \"Add New Media in Zabbix\"\n    }\n  ]\n}\n[/block]\n## Step 4: Add action\n\nGo to Configuration -> Actions. In the right-top corner Select Triggers as eventSource and click create Action. Name the action as Neptune and enable recovery message and the action by selecting enabled field. Use the below set of fields for both trigger and recovery.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"name:{TRIGGER.NAME}\\nid:{TRIGGER.ID}\\nstatus:{TRIGGER.STATUS}\\nhostname:{HOSTNAME}\\nip:{IPADDRESS}\\nvalue:{TRIGGER.VALUE}\\nevent_id:{EVENT.ID}\\nseverity:{TRIGGER.SEVERITY}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/x6I7yNNTbaU8CAimBJRw_Add_action.png\",\n        \"Add_action.png\",\n        \"699\",\n        \"503\",\n        \"#4f699d\",\n        \"\"\n      ],\n      \"caption\": \"Adding new action in Zabbix.\"\n    }\n  ]\n}\n[/block]\nSelect Conditions tab and add New conditons as 1) Trigger value = PROBLEM and 2) Trigger value = OK.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0GdDjlwwTQiDIqkCxlZo_Action_conditions.png\",\n        \"Action_conditions.png\",\n        \"697\",\n        \"261\",\n        \"#5471a5\",\n        \"\"\n      ],\n      \"caption\": \"Adding condition in Zabbix action.\"\n    }\n  ]\n}\n[/block]\nIn operations tab select Neptune in the \"send only to\" field select  Neptune. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/KWK9hzvkR8aU32gjLRTQ_Operations_details.png\",\n        \"Operations_details.png\",\n        \"722\",\n        \"407\",\n        \"#b23628\",\n        \"\"\n      ],\n      \"caption\": \"Adding operation in Zabbix action.\"\n    }\n  ]\n}\n[/block]\nFinally Click add to finish the action configuration.\nThat's it. You should now be receiving your Zabbix alerts into Neptune.","excerpt":"","slug":"zabbix-integration","type":"basic","title":"Zabbix"}
[block:callout] { "type": "info", "title": "For PagerDuty + Zabbix users", "body": "If you are pushing your Zabbix alerts to PagerDuty, Neptune.io will receive from PagerDuty so directly go to PagerDuty integration." } [/block] These are the steps for integrating Zabbix directly with Neptune.io. ## Step 1: Download the required python script from Github. Download `notify_neptuneio_zabbix.py` from Github and copy it to the directory which contains the alert scripts (e.g, `/etc/zabbix/alert.d/` but this might be different based on Zabbix version you are using). [block:code] { "codes": [ { "code": "wget https://raw.githubusercontent.com/neptuneio/zabbix-integration/master/notify_neptuneio_zabbix.py\n\ncp notify_neptuneio_zabbix.py /etc/zabbix/alert.d/", "language": "shell" } ] } [/block] ## Step 2: Make sure the script is executable by Zabbix. [block:code] { "codes": [ { "code": "chmod 755 /etc/zabbix/alert.d/notify_neptuneio_zabbix.py", "language": "shell" } ] } [/block] # Do the following steps from your Zabbix portal. ## Step 3: Create Neptune Mediatype In Zabbix portal go to Administration -> Mediatypes and add a new Mediatype with name "Neptune" and type: "script" and give `notify_neptuneio_zabbix.py` as the script name. Do not forget to select enable before clicking add. [block:image] { "images": [ { "image": [ "https://files.readme.io/ypt6MmP3QFONEgFeUTfJ_Zabbix_add_media.png", "Zabbix_add_media.png", "737", "278", "#526ea2", "" ], "caption": "Adding media type in Zabbix." } ] } [/block] ## Step 4: Add media type to a user. Add Neptune media type to either an existing user or a new user. This user need not have admin privileges. 1) Go to Administration->users and select user view in the selection box on the right side of the page. 2) Select on the user you want to add the media to. 3) In Media tab click add Media and select type as Neptune, fill Neptune_api_key in send_to field and active as 1-7,00:00-24:00 [block:image] { "images": [ { "image": [ "https://files.readme.io/MzrslyGTzglW68UG4wfw_Add_Media.png", "Add_Media.png", "1163", "412", "#516da0", "" ], "caption": "Add New Media in Zabbix" } ] } [/block] ## Step 4: Add action Go to Configuration -> Actions. In the right-top corner Select Triggers as eventSource and click create Action. Name the action as Neptune and enable recovery message and the action by selecting enabled field. Use the below set of fields for both trigger and recovery. [block:code] { "codes": [ { "code": "name:{TRIGGER.NAME}\nid:{TRIGGER.ID}\nstatus:{TRIGGER.STATUS}\nhostname:{HOSTNAME}\nip:{IPADDRESS}\nvalue:{TRIGGER.VALUE}\nevent_id:{EVENT.ID}\nseverity:{TRIGGER.SEVERITY}", "language": "json" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/x6I7yNNTbaU8CAimBJRw_Add_action.png", "Add_action.png", "699", "503", "#4f699d", "" ], "caption": "Adding new action in Zabbix." } ] } [/block] Select Conditions tab and add New conditons as 1) Trigger value = PROBLEM and 2) Trigger value = OK. [block:image] { "images": [ { "image": [ "https://files.readme.io/0GdDjlwwTQiDIqkCxlZo_Action_conditions.png", "Action_conditions.png", "697", "261", "#5471a5", "" ], "caption": "Adding condition in Zabbix action." } ] } [/block] In operations tab select Neptune in the "send only to" field select Neptune. [block:image] { "images": [ { "image": [ "https://files.readme.io/KWK9hzvkR8aU32gjLRTQ_Operations_details.png", "Operations_details.png", "722", "407", "#b23628", "" ], "caption": "Adding operation in Zabbix action." } ] } [/block] Finally Click add to finish the action configuration. That's it. You should now be receiving your Zabbix alerts into Neptune.