Nagios/Icinga plugin for checking SATEON field network device status

Overview

check_sateon

Nagios/Icinga plugin for checking SATEON field network device status

Max.Fischer [email protected] Tested on CentOS GNU/Linux 6.5 with Icinga r2.6.3-1

Script fetches device_list and fault_list from SATEON server via http, parses parameters and stores them to the local cache. Device status returned upon each run using standard Nagios/Icinga codes.

supposed to be placed in nagios plugins directory, i.e.:

/usr/lib/nagios/plugins/check_sateon.php - CHMOD 755

Usage example:

./check_sateon.php --hostname 10.0.1.1 --status-dc dc-fault-list.txt --list-dc dc-list.txt --device DOOR-2.14

To run this script you need to make available for http request full list of field network devices and list of current hardware faults.

Expected format of SATEON output

Device list

Result of scheduled execution of 'export_list-dc.ps1'

Address                    : 8
BccsId                     : ff30a8ea-0162-7790-a091-67f84cc83b1c
BoxTypeId                  : dabe4449-4646-47fe-9fcc-97df5abd91f5
Comment                    : 
Description                : DOOR-2.16
Interlock                  : False
LineId                     : 6778da32-8730-4801-be5c-0e854407f14d
MainsFailurePeriod         : -1
Poll                       : True
TimeZoneId                 : Western Standard Time
Identity                   : AccessControl.Box:13f568a4-1423-4041-fd31-a6862dffc7af
LastModifiedDate           : 02.02.2020 13:47:16
CreationDate               : 02.02.2020 13:47:16
SecurityContextId          : 
SystemId                   : 00000000-0000-0000-0000-000000000000
PartitionId                : 
UpgradeId                  : f342168a5-cf30-5652-9a64-df686aafc7f2
IsLinkableOutsidePartition : False
IsSystem                   : False

Fault List

Result of scheduled execution of 'export_status-dc.ps1'

Entity Type       : AccessControl.Box
Entity Id         : 13f568a4-1423-4041-fd31-a6862dffc7af
Property Name     : State
IsAbnormal        : True
Value             : OffLine
LastChanged       : 19.04.2020 10:33:45 +03:00
AbnormalTimestamp : 19.04.2020 8:33:45 +00:00

Icinga Configuration Definitions

Use 'sateon-config-generator.php' to generate Icinga configuration

Configure host

object Host "DOOR-2.16" {
    check_command = "check_sateon"
    host.vars.sateon == "True"
    vars.hostname = "10.0.0.10"
    vars.username = "spectator"
    vars.password = "secret_password"
    vars.status_log = "dc-fault-list.txt"
    vars.id_log = "dc-list.txt"
}

Configure service

apply Service "sateon_device" {
    display_name = "Device status"
    import "generic-service"
    check_command = "check_sateon"
    assign where host.vars.sateon == "True"
    vars.hostname = "10.0.0.10"
    vars.username = "spectator"
    vars.password = "secret_password"
    vars.status_log = "dc-fault-list.txt"
    vars.id_log = "dc-list.txt"
    vars.device_id = host.name
}

Configure Command

object CheckCommand "check_sateon" {
    import "plugin-check-command"
    command = [ PluginDir + "/check_sateon.php" ]
    arguments = {
        "--hostname" = "$hostname$"
    	"--username" = "$username$"
    	"--password" = "$password$"
    	"--status-dc" = "$status_log$"
    	"--list-dc" = "$id_log$"
    	"--device" = "$device_id$"
    }
}

License

check_sateon is licensed under the MIT license for all open source applications.

Bugs and feature requests

If you find a bug, please report it here on Github.

Guidelines for bug reports:

  1. Use the GitHub issue search — check if the issue has already been reported.
  2. Check if the issue has been fixed — try to reproduce it using the latest master or development branch in the repository.
  3. Isolate the problem — create a reduced test case and a live example.

A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report.

Feature requests are welcome. Please look for existing ones and use GitHub's "reactions" feature to vote.

You might also like...
A Symfony2 bundle that integrates Select2 as a drop-in replacement for a standard entity field on a Symfony form.
A Symfony2 bundle that integrates Select2 as a drop-in replacement for a standard entity field on a Symfony form.

select2entity-bundle Introduction This is a Symfony bundle which enables the popular Select2 component to be used as a drop-in replacement for a stand

Magento 2 extension. Strekoza_GoogleCategory. Add Category Attribute (field) - "Google Category"

Magento 2 extension. Strekoza_GoogleCategory Magento 2 extension. Add Category Attribute (field) - "Google Category" This exstension will add Category

Ranting field for the Filament forms
Ranting field for the Filament forms

Ranting field for the Filament forms

Multi-language field export/import tool for ProcessWire

Language field export/import for ProcessWire Typically the way you translate page field values in ProcessWire is to edit a page, view the text in one

Adds a "spam protection" field to SilverStripe userforms using Cloudflare's Turnstile service.

Turnstile for Silverstripe Adds a "spam protection" field to SilverStripe userforms using Cloudflare's Turnstile service. Maintainer Contact Ed Chipma

A status monitor for Elite Dangerous, written in PHP. Designed for 1080p screens in the four-panel-view in panel.php, and for 7 inch screens with a resolution of 1024x600 connected to a Raspberry Pi.

EDStatusPanel A status monitor for Elite Dangerous, written in PHP. Designed for 1080p screens in the four-panel-view in panel.php, and for 7 inch scr

Simple, modern looking server status page with administration and some nice features, that can run even on shared webhosting
Simple, modern looking server status page with administration and some nice features, that can run even on shared webhosting

Simple, modern looking server status page with administration and some nice features, that can run even on shared webhosting

Check modules in app/code and vendor for PHP 8 compatibility status - PHP_CodeSniffer & php-compatibility standard
Check modules in app/code and vendor for PHP 8 compatibility status - PHP_CodeSniffer & php-compatibility standard

M2 PHP version compatibility check How To use Requires PHP 7.3+ | PHP 8 This app will run PHP_CodeSniffer with phpcompatibility/php-compatibility on t

Owner
null
Provide CSV, JSON, XML and YAML files as an Import Source for the Icinga Director and optionally ship hand-crafted additional Icinga2 config files

Icinga Web 2 Fileshipper module The main purpose of this module is to extend Icinga Director using some of it's exported hooks. Based on them it offer

Icinga 25 Sep 18, 2022
SPAM Registration Stopper is a Q2A plugin that prevents highly probable SPAM user registrations based on well-known SPAM checking services and other techniques

SPAM Registration Stopper [by Gabriel Zanetti] Description SPAM Registration Stopper is a Question2Answer plugin that prevents highly probable SPAM us

Gabriel Zanetti 2 Jan 23, 2022
Mobile detect change theme and redirect based on device type. Magento 2 module.

Magento 2 Mobile Detect Theme Change Magento 2 Mobile detect system can be used to load different themes base on the client device (desktop, tablet, m

EAdesign 27 Jul 5, 2022
A tidy conditional Blade directive for checking if something is in an array

A tidy conditional Blade directive for checking if something is in an array. This package provides a small @in directive that allows you to simplify i

Ryan Chandler 0 Oct 7, 2022
Keep control over the complexity of your methods by checking that they do not have too many arguments.

php arguments detector The ideal number of arguments for a function is zero. ~ Robert C. Martin Keep control over the complexity of your methods by ch

DeGraciaMathieu 13 Dec 26, 2022
Bundle providing Honeypot field for the Form Builder in Ibexa DXP Experience/Commerce (3.X)

IbexaHoneypot Bundle providing Honeypot field for the Form Builder in Ibexa DXP Experience/Commerce (3.X) What is Honey pot? A honey pot trap involves

null 1 Oct 14, 2021
A measurement field for ProcessWire

Fieldtype Measurement This fieldtype allows a measurement unit to be stored with a corresponding measurement value ('magnitude'). The relevant details

Mark Evens 2 Aug 6, 2022
A layout field that forces translations to have the same structure.

Kirby translatedlayout plugin A layout field that forces translations to have anidentical structure to the one of the default language. This is an exp

Daan de Lange 12 Apr 25, 2022
Markdownfield - Markdown field for SilverStripe

MarkdownField This module introduces a new DB field type Markdown & Markdown Editor. It uses github style Markdown style. And uses the simple markdown

SilverStripers 10 Jul 10, 2022
This module integrates Silverstripe CMS with Google Translate API and then allows content editors to use automatic translation for every translatable field.

Autotranslate This module integrates Silverstripe CMS with Google Translate API and then allows content editors to use automatic translation for every

null 4 Jan 3, 2022