Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

LibreNMS Integration

LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring which includes support for a wide range of network hardware and operating systems including Cisco, Linux, Juniper, Foundry, and many more. OpsGenie is an alert and notification management solution that is highly complementary to LibreNMS's alerting system.

What does OpsGenie offer to LibreNMS users?

Using OpsGenie LibreNMS integration, LibreNMS forwards alerts to OpsGenie with detailed information. OpsGenie acts as a dispatcher for LibreNMS alerts, determining the right people to notify based on on-call schedules, using email, text messages (SMS), phone calls and iOS & Android push notifications, and escalating alerts until the alert is acknowledged or closed.

Functionality of the integration

  • When an alert is triggered in LibreNMS, it creates an alert in OpsGenie.
  • When the alert is acknowledged in LibreNMS, it acknowledges the alert in OpsGenie.
  • When the alert is closed in LibreNMS, it closes the alert in OpsGenie.
  • If Send Alert Updates Back to LibreNMS is enabled, actions for LibreNMS will be executed in LibreNMS when the chosen action is executed in OpsGenie for alerts which are created by the LibreNMS integration. (Optional)

Add LibreNMS Integration in OpsGenie

  1. Please create an OpsGenie account if you haven't done already.
  2. Go to OpsGenie LibreNMS Integration page.
  3. Specify who should be notified for LibreNMS alerts using the "Teams" field. Auto-complete suggestions will be provided as you type.
  4. Copy the Webhook URL by clicking on the copy button or selecting.
  5. Click on "Save Integration".

Configuration in LibreNMS

  1. Open Global Settings from the gear icon on the top menu in LibreNMS.
  2. Select Alerting Settings tab.
  3. Find OpsGenie from the list and expand it by clicking on the arrow.
  4. Paste your Webhook URL into the OpsGenie URL field.

Integration via Marid (Optional)

You can use OpsGenie's LibreNMS package to acknowledge or unmute alerts in LibreNMS. This will enable you to deploy your own scripts / modify the ones provided and execute customized actions on LibreNMS alerts.

Download and install LibreNMS package

For Red Hat Based Distributions

During upgrades, rpm package does not overwrite your existing configurations. It saves the new default configuration file as opsgenie-integration.conf.rpmnew. You can find more information about rpm upgrade config file handling from here.

For Debian Based Distributions

To set JAVA_HOME environment variable, refer to Setting JAVA_HOME for more information.

To enable Ruby scripting, you need to download JRuby Complete jar file and put this jar file in lib directory (/var/lib/opsgenie/marid On Linux, MARID_HOME/lib on Windows systems.).

Configuring LibreNMS Integration for Marid

  • Configurations regarding LibreNMS can be done either via integration page or Marid configuration file opsgenie-integration.conf. Configuration in integration page will precede the configuration file.
  • To start Marid, run the following command: sudo /etc/init.d/marid start
  • To stop Marid, run the following command: sudo /etc/init.d/marid stop

To be able to execute actions in LibreNMS, Marid gets the configuration parameters from <MARID_HOME>/conf/marid.conf file.

Parameter
Description
Mandatory to Fill

apiKey

Copy the API key from the LibreNMS integration you've created above

Yes

librenms.url

Your LibreNMS server URL

Yes

librenms.apiToken

Your LibreNMS server API token

Yes

According to the action that will be executed in LibreNMS, the script to be run can be set here. OpsGenie's script is set by default; you can change the following configuration to run your own custom script if you like.

Action Mappings

mappedActions.ackAlert.script

librenmsActionExecutor.groovy

mappedActions.unmuteAlert.script

librenmsActionExecutor.groovy

Sample Parameters Sent to Marid

{
  "type": "libreNMS",
  "alertId": "f3b3475f-3859-4bd1-b472-ab339ea1e61d",
  "customerId": "4a644594-240d-4a51-ab88-0171ed29c0ce",
  "action": "Acknowledge",
  "mappedActionV2": {
    "name": "ackAlert",
    "extraField": ""
  },
  "integrationId": "1334572c-f412-428c-9ab1-607f8313fba3",
  "integrationName": "LibreNMS",
  "integrationType": "LibreNMS",
  "sendViaMarid": true,
  "alertFlowContext": {
    "requestId": "9eb36837-e601-12da-92ba-8fe3224230ad",
    "traceId": "9eb36837-e601-12da-92ba-8fe3224230ad",
    "content": {
      "alertId": "f3b3475f-3859-4bd1-b472-ab339ea1e61d"
    }
  },
  "url": "",
  "apiToken": "",
  "rule": "%macros.device_up = \"1\" && %processors.processor_usage >= \"1\""
}

LibreNMS Integration