Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

egodigital/icinga2-mongo-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

icinga2-mongo-plugin

A simple plugin for Icinga2 checking MongoDB compatible connections.

Usage

You have to clone the plugin e.g. in the /usr/lib/nagios/plugins folder and install it:

git clone https://github.com/egodigital/icinga2-mongo-plugin.git
cd icinga2-mongo-plugin
npm install

First define a new command:

object CheckCommand "check_mongo_connection" {
  command = [ PluginDir + "/icinga2-mongo-plugin/run", "-u", "$mongo_uri$" ]

  vars.mongo_uri = "$host.vars.mongo_uri$"
}

Define a Host that uses the check_mongo_connection command:

object Host "some-mongo-host" {
  import "generic-host"
  
  check_command = "check_mongo_connection"

  vars.mongo_uri = "<YOUR-MONGODB-URI>"
}

Releases

No releases published

Packages

No packages published