Get started with Opsgenie as a user
Learn how to configure your profile, get notifications from Opsgenie and view on-call schedules.
The Zenoss integration plugin utilizes the full capabilities of Opsgenie and provides bi-directional integration with Zenoss. The integration leverages Opsgenie’s Zenoss-specific executable and OEC utility to create alerts automatically and synchronizes alert status between Zenoss and Opsgenie.
The following steps describe integrating Opsgenie and Zenoss using the Opsgenie Zenoss integration plugin. Note that slight alteration to these instructions may be necessary depending on the exact Linux distribution and your Zenoss configuration.
The installation packages support the following systems:
RedHat-based Linux distributions
Debian-based Linux distributions
Opsgenie Edge Connector (abbreviated as OEC) is a prerequisite for configuring the outgoing authentication of Zenoss integration. You can combinedly use OEC and Zenoss scripts to update alerts on Zenoss. With this setup, you can deploy your own script, modify the ones provided, or run customized actions on Zenoss. Download the latest version of the Zenoss package from this repository.
Run the following command:
rpm -i opsgenie-zenoss-<your_version>.rpm
Before rpm upgrades, back up your configuration files.
The rpm package does not overwrite the existing configuration during upgrades. It saves the new default configuration file as integration.conf.rpmnew. To upgrade from version 201X-XX-XX to 2.X.X, add the --force parameter. For example: rpm -U --force opsgenie-zenoss-<your_version>.rpm
Learn more about config file handling for rpm upgrades.
Run the following command:
dpkg -i opsgenie-zenoss-<your_version>.deb
If you're using Opsgenie's Free or Essentials plan or if you’re using Opsgenie with Jira Service Management's Standard plan, you can add this integration from your team dashboard only. The Integrations page under Settings is not available in your plan.
Go to Teams and select your team.
Select Integrations on the left navigation and then select Add integration.
Adding the integration from your team dashboard will make your team the owner of the integration. This means Opsgenie will assign the alerts received through this integration to your team only. Follow the rest of the steps in this section to set up the integration.
To add a Zenoss integration in Opsgenie:
Go to Settings > Integrations.
Select Add integration.
Run a search and select “Zenoss”.
On the next screen, enter a name for the integration.
Optional: Select a team in Assignee team if you want a specific team to receive alerts from the integration.
Select Continue.
The integration is saved at this point.
Expand the Steps to configure the integration section and copy the API key.
You will use this key while configuring the integration in Zenoss later.
Select Turn on integration.
The rules you create for the integration will work only if you turn on the integration.
The plugin uses a golang-executable file (included in the plugin as send2opsgenie) to create, acknowledge, and close alerts in Opsgenie. To make send2opsgenie work, you need to make some configurations. The following table lists the parameters and states if they are mandatory.
Configuration Parameters | Description | Mandatory |
---|---|---|
apiKey | Copy the API key from the Zenoss integration you've created above. send2opsgenie uses this key to authenticate to Opsgenie. API key is also used to identify the right integration configuration that should be used to process alerts. | Yes |
baseUrl | If you're using Opsgenie from another domain(eg. EU, sandbox), you should update this configuration. Opsgenie Zenoss integration, Advanced Zenoss page. |
|
zenoss.command_url | URL to get detailed event data from Zenoss in send2opsgenie. | Optional |
zenoss.user | Credentials to authenticate Zenoss web server | Optional |
zenoss.password | Credentials to authenticate Zenoss web server | Optional |
responders | Responders field is used to specify which responders should be notified for the Zenoss alerts. This field is used to set the default responder field value. It can be modified to route different alerts to different teams in Opsgenie Zenoss integration, Advanced Settings page.schedules who will be notified by Opsgenie. If you did not set recipients in the integration, this field is required. | Optional |
tags | Tags field is used to specify the tags of the alert that created in Opsgenie. | Optional |
logPath | Specifies the full path of the log file. (Default value is /var/log/opsgenie/send2opsgenie.log) | Optional |
zenoss2opsgenie.http.proxy.enabled | zenoss2opsgenie.http.proxy.enabled field is to enable/disable external proxy configuration. The default value is false. | Optional |
zenoss2opsgenie.http.proxy.host | It is the host of the proxy. | Optional |
zenoss2opsgenie.http.proxy.port | It is the port of the proxy. | Optional |
zenoss2opsgenie.http.proxy.scheme | It is the proxy connection protocol. It may be http or https depending on your proxy servers. Its default value is http. | Optional |
zenoss2opsgenie.http.proxy.username | It is the Proxy authentication username. | Optional |
zenoss2opsgenie.http.proxy.password | It is the Proxy authentication password. | Optional |
Configure the golang-executable file in any of the following three methods:
Configure from the /home/opsgenie/oec/conf/integration.conf file. This overwrites any configuration you previously made in the script.
Configure by entering flags into the command of the notification created in Zenoss, described in “Configure triggers in Zenoss”. Use -apiKey flag for your apiKey.
To send additional custom arguments, add them after the flags. For example, customArgName1 customArgValue1 customArgName2 customArgValue2. Parse custom arguments by adding {{_payload.customArgName}} to wherever is needed in the input fields. To learn more about using raw parameters, see dynamic fields.
Configure apiKey send2opsgenie.go script. Build the script again and put the new executable into the /home/opgenie/oec/scripts directory. Learn more about the location of the send2opsgenie.go and how to build a go script in the “Source for and recompiling send2opsgenie” section in this article.
1. Select Events > Triggers from the Navigation menu.
2. Create a trigger named Opsgenie.
3. Select Events > Triggers from the Navigation menu.
4. Select Notifications from the left panel.
5. Create a notification.
6. Select the notification created earlier and select Edit.
7. Under the "Notification" tab, enable the notification and select the "Send Clear" checkbox.
8. Select the trigger you created earlier from the list and select Add.
9. Under the "Content" tab:
10. Add optional -eventState=close to Clear Command. send2opsgenie executable does not try to get event details from Zenoss and directly closes the event's alert in Opsgenie. /home/opsgenie/oec/scripts/send2opsgenie -evid=${evt/evid}
11. Under the "Subscribers" tab, select the subscribers and select SUBMIT.
This step is optional.
Use Opsgenie’s OEC and the Zenoss script to update alerts on Zenoss. This enables deployment of your own scripts/ability to modify the ones provided and execute customized actions on Zenoss. To execute actions in Zenoss, OEC gets the configuration parameters from the configuration file at /home/opsgenie/oec/conf/config.json.
Configuration Parameters |
| Location |
---|---|---|
command_url | URL to update Zenoss events when alerts get acknowledged, closed, etc. | /home/opsgenie/oec/conf/config.json |
user | Credentials to authenticate on Zenoss web server. | /home/opsgenie/oec/conf/config.json |
password | Credentials to authenticate on Zenoss web server. | /home/opsgenie/oec/conf/config.json |
The downloaded package includes the OEC utility (found in /usr/local/bin) and the script that OEC needs to run (found in /home/opsgenie/oec/scripts). Be sure to run OEC after configuring it. Learn more about running OEC.
The Zenoss integration package does not support SSL v1.0. If your Zenoss server has SSL v1.0, upgrade your SSL server.
The source for the executable send2opsgenie is found in /usr/bin/ and send2opsgenie.go, in /home/opsgenie/oec/scripts respectively and is also available in this repository. To change the behavior of the executable, edit send2opsgenie.go and build it by using the following command: go build send2opsgenie.go
For installing go, refer to http://golang.org/doc/install. Note that the executable in the plugin is built for linux/386 systems.
If the integration is not working, review this section and follow the prescribed guidelines.
Run the following test command from the shell and check if a test alert is created in Opsgenie:
/home/opsgenie/oec/scripts/send2opsgenie -test
If you get a "Trace/breakpoint trap" error, the send2opsgenie plugin isn't compatible with the server distribution. Rebuild send2opsgenie.go according to the specific server environment as described in the “Source for and recompiling send2opsgenie” section in this article.
If the alert is created in Opsgenie, the integration is configured correctly. Zenoss is probably not notifying theOpsgenie contact for alerts. Check your Zenoss alert notifications log.
If the alert is not created in Opsgenie, check the logs at /var/log/oec/send2opsgenie.log.
Look for the following errors in the log file:
If you see "RestException[Could not authenticate.]" in the logs, Opsgenie couldn't identify the API key. Check if the API key is set correctly per the steps outlined in “Configure the Opsgenie plugin in Zenoss“ in this article.
If unsure of the problem, set the plugin's log level to debug and try again. Contact us and share the logs.
If there is no /var/log/oec/send2opsgenie.log file or there are no logs in it, check the following:
Check if the Zenoss user has permission to write to /var/log/oec directory. The installation package should automatically do this for you. If you face issues, run the following command:
chown -R zenoss:opsgenie /var/log/oec
Check the Zenoss server logs at /opt/zenoss/log/zeneventd.log. See if there are error logs regarding send2opsgenie. Contact us with the logs as needed.
Set the send2opsgenie plugin's log level to DEBUG. Open the /home/opsgenie/oec/conf/integration.conf file and change the line send2opsgenie.logger=warning to zenoss2opsgenie.logger=debug.
Check the alert logs.
If "Posted [Acknowledge] action to Zenoss.." is not present in the log, Opsgenie didn't send the Acknowledge action to Zenoss. Check the integration configuration, it might not have a matching the alert action.
If only the "Posted [Acknowledge] action to Zenoss.." log occurs followed by no related logs, it might mean OEC is having connection problems. Check the logs.
If you figure out while installing the rpm package that the package is obsolete, use rpm -i opsgenie-zenoss-1.0.4-rpm-x86-64.rpm --nodeps instead.
If you get "is already installed" error, use rpm -i opsgenie-zenoss-1.0.4-rpm-x86-64.rpm --force instead.
Was this helpful?