Centreon documentation

Centreon documentation

  • Documentation

›Basic Objects

Getting Started

  • Installation & first steps
  • Tutorials

    • Introduction
    • Create a custom view
    • Create a graphical view
    • Model your IT services
    • Analyze resources availability

Installation

  • Introduction
  • Prerequisites
  • Architectures
  • Download
  • Installation of a Central server

    • Using Centreon ISO
    • Using packages
    • Using virtual machines (VMs)
    • Using sources
  • Web And Post Installation
  • Installation of a Poller

    • Using Centreon ISO
    • Using packages

    Installation of a Remote server

    • Using Centreon ISO
    • Using packages
  • What is Centreon CEIP?

Monitoring

  • About Monitoring
  • Generic actions
  • Basic Objects

    • Macros
    • Commands
    • Time periods
    • Contacts
    • Hosts
    • Services
    • Meta Services
  • Templates
  • Plugin Packs
  • Monitoring Servers

    • Add a Poller to configuration
    • Add a Remote Server to configuration
    • Communications
    • Deploying a configuration
    • Advanced configuration
  • Groups & Categories
  • Passive Monitoring

    • Enable SNMP Traps
    • Create SNMP Traps definitions
    • Monitoring with SNMP Traps
    • Debug SNMP Traps management
    • Dynamic Service Management
  • Anomaly detection
  • Discovery

    • Introduction
    • Installation
    • Hosts Discovery
    • Services Discovery
    • Administration
  • Auto Remediation
  • Import/Export

Alerts & Notifications

  • Concepts
  • Events view (beta)
  • Event console
  • Manage Alerts
  • Notification

    • Concept
    • Configuration
    • Dependencies
    • Escalation
    • Flapping
    • To go further
  • Ticketing
  • Event Logs

Performance graphs

  • Charts managment
  • Graph template
  • Curves
  • Virtual metrics

Service Mapping

  • Introduction to Centreon BAM
  • Guide

    • Manage Business Activities
    • Monitor Business Activities
    • Report Business Activities
    • Settings
    • Widgets

    Administrate

    • Install Centreon BAM extension
    • Update the extension
    • Upgrade the extension
    • Migrate the extension
    • Install on a Remote Server

Graphical views

  • Introduction to Centreon MAP
  • Guide

    • Create a standard view
    • Create a geo view
    • Display views
    • Share a view

    Administrate

    • Install Centreon MAP extension
    • Update the extension
    • Upgrade the extension
    • Migrate the extension
    • Configure
    • Install on a Remote server
    • Procedures
    • Known issues
  • Release notes

Reporting

  • Introduction to Centreon MBI
  • Guide

    • Generate reports
    • Available reports
    • Widgets
    • Configure
    • Concepts
    • Report development

    Administrate

    • Install Centreon MBI extension
    • Update the extension
    • Upgrade the extension
    • Migrate the extension
    • Backup & restore

Administration

  • Secure your platform
  • Parameters

    • Centreon UI
    • Monitoring
    • Gorgone
    • LDAP
    • RRDTool
    • Debug
    • Data management
    • Medias
  • Access Control Lists
  • Extensions
  • Database partitioning
  • Centreon HA

    • Architectures
    • Installing a Centreon HA 2-nodes cluster
    • Installing a Centreon HA 4-nodes cluster
    • Monitoring Centreon-HA
    • Operating guide
    • Updating Centreon-HA platform
    • Upgrade from Centreon-Failover to Centreon-HA
    • Troubleshooting guide
  • Backup
  • Knowledge Base
  • Logging configuration changes
  • Platform statistics

Update, Upgrade & Migrate

    Update

    • Update a Centreon 20.04 platform

    Upgrade

    • Introduction to upgrade
    • Upgrade from Centreon 19.10
    • Upgrade from Centreon 19.04
    • Upgrade from Centreon 18.10
    • Upgrade from Centreon 3.4

    Migrate

    • Introduction
    • Migrate from a Centreon 3.4 platform
    • Nagios Reader to Centreon CLAPI
    • Migrate a platform with Poller Display module

Plugin Packs

  • Introduction to Plugin Packs
  • Tutorials

    • Collect OpenMetrics

    Applications

    • 3CX
    • Active Directory API
    • ActiveMQ JMX
    • Alyvix Server
    • Ansible
    • Ansible Tower
    • Antivirus ClamAV
    • Apache Server
    • Asterisk VoIP Server
    • Asterisk VoIP SNMP
    • Bind9 Web
    • BlueMind SSH
    • Cassandra
    • Cisco CMS
    • Cisco ISE
    • Cisco SSMS
    • Commvault CommServe Rest API
    • DRBD SSH
    • Dynatrace Rest API
    • Exchange 2010 API
    • Github
    • Github
    • Google Gsuite
    • Haproxy SNMP
    • Hibernate
    • IBM Tivoli Storage M
    • Microsoft IIS Server Restapi
    • Microsoft IIS Server NSClient API (Deprecated)
    • JBoss Server
    • Jenkins
    • Kafka
    • Kaspersky
    • Keepalived SNMP
    • Lync 2013
    • Maltem Insight Rest API
    • IP-Label datametrie API
    • IP-Label Newtest Rest API
    • McAfee Web Gateway
    • Microsoft Cluster Se
    • Microsoft IIS Server NRPE (Deprecated)
    • Microsoft SCCM
    • Microsoft WSUS
    • MS Active Directory
    • MS Biztalk
    • Graylog
    • MS Exchange 2K10
    • BlueMind
    • Mulesoft Anypoint
    • Netbackup Rest API
    • Netdata RestAPI
    • Nginx Server
    • Nginx Plus Restapi
    • OpenHeadend
    • OpenLDAP
    • OpenMetrics
    • OpenVPN OMI
    • OpenWeatherMap
    • Oracle VM Manager API
    • Pacemaker
    • Peoplesoft
    • Pfsense Fauxapi
    • PHP APC
    • PHP FPM
    • PVX
    • Quadstor
    • RabbitMQ RestAPI
    • Rapid Recovery SNMP
    • Redis Cli
    • Redis Restapi
    • Rubrik Rest API
    • Rudder
    • Salesforce
    • SAP HANA
    • SCOM Rest API
    • Gorgone Restapi
    • Selenium
    • Sendmail
    • Skype 2015
    • Solr
    • Squid SNMP
    • Symantec Netbackup
    • Tomcat JMX
    • Tomcat Webmanager
    • TrendMicro Iwsva
    • Varnish NRPE
    • Veeam
    • Veeam API
    • VerneMQ Restapi
    • VMware VCSA RestAPI
    • VTOM
    • Wazuh Rest API
    • Weblogic Server
    • ZIXI
    • Zookeeper

    Centreon

    • Centreon Central
    • Centreon Database
    • Centreon-HA
    • Centreon Map
    • Centreon Map4
    • Centreon MBI
    • Centreon Poller

    Cloud

    • Amazon API Gateway
    • Amazon CloudFront
    • Amazon CloudWatch
    • Amazon CloudWatch Logs
    • Amazon EBS
    • Amazon EC2
    • Amazon ElastiCache
    • Amazon EFS
    • Amazon Kinesis
    • Amazon RDS
    • Amazon S3
    • Amazon SES
    • Amazon SNS
    • Amazon SQS
    • AWS Billing
    • AWS ELB
    • AWS Health
    • AWS Lambda
    • AWS Transit Gateway
    • AWS VPN
    • Azure ExpressRoute
    • Azure Log Analytics
    • Azure Monitor
    • Azure Network Interface
    • Azure Recovery
    • Azure Resource
    • Azure SQL Database
    • Azure SQL Server
    • Azure Storage Account
    • Azure Virtual Machine
    • Azure Virtual Network
    • Azure VPN Gateway
    • cAdvisor
    • Cloud Foundry
    • Docker
    • IBM Softlayer
    • Kubernetes API
    • Kubernetes w/ Prometheus
    • Office 365
    • Office365 Exchange
    • Office365 OneDrive
    • Office365 SharePoint
    • Office365 Skype
    • Office365 Teams
    • OVH
    • Prometheus Server
    • Node Exporter
    • VMware VeloCloud

    Database

    • CouchDB Rest API
    • Elasticsearch
    • Elasticsearch (Deprecated)
    • Firebird
    • InfluxDB
    • Informix DB
    • Informix DB SNMP
    • Microsoft SQL Server
    • MongoDB
    • MySQL/MariaDB
    • Oracle Database
    • PostgreSQL DB
    • RRDtool
    • Sybase
    • Warp10 Sensision

    Hardware Server

    • Adder AIM SNMP
    • AEG ACM
    • Avocent ACS 6000
    • Axis Video
    • Cisco Collaboration Endpoint Rest API
    • Cisco UCS
    • Dell CMC
    • Dell iDRAC
    • Dell OpenManage
    • Eltek eNexus SNMP
    • Fujitsu Server SNMP
    • Hanwha camera SNMP
    • Hikvision camera SNMP
    • HMS Ewon SNMP
    • Timelinkmicro Tms6001
    • HP Blade Chassis
    • HP Ilo Rest API
    • HP Ilo XMLAPI
    • HP OneView Rest API
    • HP Proliant
    • Huawei HMM
    • Huawei iBMC
    • IBM BladeCenter
    • IBM IMM
    • Lenovo XCC SNMP
    • Cisco Telepresence System SNMP
    • Masterclock NTP100GP
    • Pexip Infinity ManagementAPI
    • Polycom GroupSeries SNMP
    • Polycom Trio Rest API
    • Safenet Keysecure
    • Sun MgmtCard
    • Sun Mseries
    • Sun SFxxK
    • Supermicro

    Network

    • 3com Network
    • A10 AX
    • Acme Packet
    • Adva FSP 150 SNMP
    • Adva FSP 3000 SNMP
    • Aerohive
    • Alcatel Omniswitch
    • Allied Telesis SNMP
    • Alvarion BreezeACCESS SNMP
    • Arista Switch
    • Arkoon
    • Aruba Instant SNMP
    • Aruba Standard
    • Atrica Routeur
    • Atto Fibrebridge SNMP
    • Barracuda Cloudgen SNMP
    • Bee Ware
    • BGP Protocol SNMP
    • Bluecoat generic
    • Brocade Switch
    • CheckPoint firewall
    • Cisco Apic
    • Cisco ASA
    • Cisco Call Manager
    • Cisco Callmanager SXML
    • Cisco ESA XMLAPI
    • Cisco Firepower Management Console Rest API
    • Cisco IronPort
    • Cisco Meraki Rest API
    • Cisco Meraki
    • Cisco Prime
    • Cisco Small Business
    • Cisco Standard
    • Cisco Standard SSH
    • Cisco VCS
    • Cisco Voice Gateway
    • Cisco Waas
    • Cisco WLC
    • Citrix Acceleration
    • Citrix Netscaler
    • Citrix SDX
    • Colubris SNMP
    • Cyberoam
    • D-Link DGS 3100
    • D-Link standard SNMP
    • Dell 6200
    • Dell 6200 SNMP
    • Dell N4000
    • Dell OS10 SNMP
    • Dell S-series
    • Dell Xseries
    • Digi Anywhere USB
    • Digi PortServers TS
    • Digi PortServers TS
    • Digi Sarian
    • Efficienti IP
    • Evertz FC7800
    • Extreme Network
    • F5 BigIP
    • Lenovo Flex System Switch
    • Fortinet FortiAuthenticator SNMP
    • Fortinet Fortigate
    • Fortinet Fortimanage
    • Freebox
    • FritzBox
    • Gorgy NTP Server
    • H3C Network
    • Hirschmann switch
    • HP Procurve
    • HP Standard Network
    • HP Virtual Connect
    • Huawei
    • Infoblox SNMP
    • Juniper EX Series
    • Juniper GGSN
    • Juniper ISG
    • Juniper M-Series
    • Juniper Mag
    • Juniper SA
    • Juniper SRX
    • Juniper SSG
    • Juniper Trapeze
    • Kemp Loadbalancer
    • Mikrotik SNMP
    • Mitel 3300ICP
    • Moxa Switch
    • Mrv Optiswitch
    • NetASQ Network
    • Netgear MSeries
    • Netscaler MPX 8000
    • Nokia TiMos
    • Nortel Standard
    • Omniswitch 6850
    • OneAccess Network
    • Oracle Infiniband
    • Palo Alto firewall SNMP
    • Palo Alto firewall SSH
    • Peplink Balance
    • Peplink Pepwave SNMP
    • Perle IDS SNMP
    • pfSense
    • Rad Airmux SNMP
    • Radware Alteon
    • Raisecom
    • RedBack Router
    • Riverbed Interceptor
    • Riverbed SteelHead
    • Ruckus
    • Ruckus Zonedirector
    • Ruckus ICX
    • Ruckus SCG
    • Ruckus Smartzone
    • Ruggedcom Network
    • Silverpeak
    • Sonicwall
    • Sophos ES
    • Stonesoft
    • Stormshield SNMP
    • Stormshield SSH
    • Teltonika SNMP
    • Traffic Director
    • Ucopia
    • Watchguard
    • Zyxel
    • Versa SNMP
    • Versa Director Restapi

    Operating System

    • AIX SNMP
    • Base Pack
    • FreeBSD SNMP
    • HP-UX
    • IBM AS400
    • Linux NRPE
    • Linux NRPE3
    • Linux SNMP
    • Linux SSH
    • Mac SNMP
    • Solaris SNMP
    • Windows NRPE
    • Windows NRPE 0.5
    • Windows NSClient API
    • Windows SNMP

    Printer

    • Printer standard

    Protocol

    • BGP Protocol
    • DHCP Server
    • DNS Service
    • FTP Server
    • Generic SNMP
    • HTTP Server
    • IMAP Server
    • JMX value
    • LDAP Server
    • Modbus
    • NTP Server
    • OSPF Protocol
    • POP Server
    • Protocol DHCP
    • Protocol SSH
    • Protocol TCP
    • Protocol UDP
    • Radius Service
    • SMTP Server
    • Telnet Scenario
    • TFTP Server
    • X509 Certificat

    Sensor

    • ABB CMS-700
    • AKCP Sensor
    • Geist p8000 sensor SNMP
    • Geist Sensor SNMP
    • HWg-STE Sensor
    • Jacarta Sensor
    • LM Sensors
    • Netbotz Sensor
    • Sensor IP
    • SensorGateway
    • Sensormetrix

    Storage

    • Adic Tape SNMP
    • Avid Isis
    • Buffalo TeraStation SNMP
    • Dell Compellent
    • Dell Compellent API
    • Dell Equallogic
    • Dell FluidFS
    • Dell MD3000
    • Dell Me4 Rest API
    • Dell ML6000
    • Dell TL2000
    • EMC Celerra
    • EMC Clariion
    • EMC Data Domain
    • EMC Isilon
    • EMC RecoveryPoint
    • EMC Symmetrix API
    • EMC Symmetrix NRPE
    • EMC Unisphere Rest API
    • EMC Vplex
    • EMC Xtremio
    • Exagrid
    • Fujitsu Eternus DX
    • Hitachi HCP SNMP
    • Hitachi NAS
    • Hitachi Standard
    • HP 3PAR 7000
    • HP 3PAR SSH
    • HP EVA
    • HP Lefthand
    • HP MSA2000
    • HP MSL
    • HP P2000
    • HP StoreOnce
    • HP StoreOnce SSH
    • IBM DS3000
    • IBM DS4000
    • IBM DS5000
    • IBM FlashSystem 900
    • IBM Storwize
    • IBM TS2900
    • IBM TS3100
    • IBM TS3200
    • IBM TS3500
    • Kaminario RestAPI
    • Lenovo S Series
    • NetApp Ontap OnCommand API
    • NetApp Ontap Rest API
    • NetApp Ontap SNMP
    • Netapp Santricity Restapi
    • Netgear Readynas SNMP
    • Nimble Storage
    • Nimble Storage Rest API
    • Oracle ZFS
    • Oracle ZS
    • Overland Neo
    • Panzura
    • Pure Storage RestAPI
    • Qnap
    • QSAN NAS
    • Quantum DXi Series
    • Quantum Scalar
    • Storagetek SL
    • Synology
    • Violin Memory 3000

    Toip Voip

    • Alcatel OXE
    • Asterisk VoIP Server
    • AudioCodes
    • Avaya AES SNMP
    • Avaya Media Gateway SNMP
    • Polycom DMA SNMP
    • Polycom HDX SNMP
    • Polycom RMX
    • Polycom RPRM SNMP
    • Sonus SBC
    • XiVO VoIP Server

    Ups Pdu

    • Alpha UPS SNMP
    • APC ATS
    • APC PDU
    • APC UPS
    • Clever PDU
    • CyberPower Systems PDU SNMP
    • Eaton ATS SNMP
    • Eaton PDU SNMP
    • Emerson PDU
    • HP UPS SNMP
    • MGE UPS System
    • Nitram UPS SNMP
    • Powerware UPS
    • Raritan PDU
    • Schleifenbauer Gateway SNMP
    • UPS Standard

    Virtualization

    • Hyper-V 2012
    • Nutanix
    • Proxmox VE
    • VMware ESX
    • VMware ESX WS-MAN
    • VMware vCenter
    • VMware vCenter v4
    • VMware vCenter v5
    • VMware vCenter v6
    • VMware VM

Integrations

    External

    • Accedian PVX Skylight
    • Maltem Insight Performances Rest API

    Notifications

    • Notify with Telegram bot

    Open Tickets

    • BMC Footprints
    • BMC Remedy
    • EasyVista
    • GLPI
    • GLPI RestAPI
    • iTop
    • IWS Isilog
    • Jira
    • Mail
    • OTRS RestAPI
    • Request Tracker RestAPI
    • Serena
    • ServiceNow

    Stream Connectors

    • BSM
    • Elasticsearch events
    • Elasticsearch metrics
    • NDO
    • HP OMI
    • PagerDuty Service integration
    • ServiceNow Event Manager
    • ServiceNow MID Server
    • Splunk Metrics
    • Splunk Events
    • Warp10

Mobile App.

  • Introduction

API

  • Introduction
  • Command Line API (v1)
  • Rest API (v1)
  • Rest API (v2)
  • Graphical views API (beta)

Developer resources

  • About developer resources
  • How to write a module
  • How to write a Stream Connector
  • How to translate Centreon
  • How to write a widget
  • Centreon Broker

    • Stream connectors
    • The BBDO protocol
    • Centreon Broker Event Mapping

Releases

  • Centreon Platform 20.04.0
  • Products lifecycle policy
  • Release notes by component

    • Centreon Core
    • Commercial Extensions
    • Open Source Extensions
Edit

Commands

Definition

A command is the definition of a line of command which uses a script or an application to perform an action. It is possible execute this command by specifying arguments.

There are four types of command:

  • Verification commands are used by the schedulers to verify the status of a host or of a service.
  • Notification commands are used by the schedulers to alert the contacts (via mail, SMS, etc.).
  • Discovery commands are used by the schedulers to discover.
  • Miscellaneous commands are used by the additional modules (to perform certain actions), by the scheduler for data processing, etc.

All the commands can be configured in the menu: Configuration > Commands.

image

By default, locked commands are hidden. Check the "Locked elements" box to list all commands.

Adding a command

  1. Go to the Configuration > Commands menu
  2. Click on Add

image

The configuration fields of a command are the same regardless of the type of command chosen.

Configuration fields

  • The command Name field defined the name of the command.
  • The Command Type field allows us to choose the type of command.
  • The Command Line field indicates the application or the script use with the command.
  • The Enable shell box allows us to enable functions that are specific to a shell such as the pipe, etc.
  • The Argument Example field define examples of arguments (each argument starts with a ”!”)
  • The Describe arguments button serves to add a description to arguments of the “$ARGn$” type. This description will be visible when using the command in a host or service form.
  • The Clear arguments button deletes the description of arguments defined
  • The Describe macros button serves to add a description to all macros. This description will be visible when using the command in a host or service form.
  • The Connectors selectlist serves to link a Connector to the command. For more information on Connectors refer to the chapter entitled Perl Connector and SSH Connector.
  • The Graph template field serves to link the command to a graphic model.
  • The Comment field can be used to make a comment on the command.

Arguments and macros

In the Command Line field it is possible to use macros and arguments.

The macros are used to be able to pass various settings to the scripts called up by the commands. During execution of the command by the scheduler, each of the arguments and macros are replaced by their respective values. Each macro appears in the form $value$:

$CENTREONPLUGINS$/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=cpu \
--hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' \
--snmp-community='$_HOSTSNMPCOMMUNITY$' $_HOSTSNMPEXTRAOPTIONS$ \
--warning-average='$_SERVICEWARNING$' \
--critical-average='$_SERVICECRITICAL$' $_SERVICEEXTRAOPTIONS$

Good practice requires replacing the arguments by custom macros.

Connectors

SSH connector

Centreon SSH Connector is a free software from Centreon available under the Apache Software License version 2 (ASL 2.0). It speeds up execution checks over SSH when used along Centreon Engine.

Installation

Centreon recommends using its official packages. Most of Centreon’ endorsed software are available as RPM packages.

Run the following commands as privileged user:

yum install centreon-connector-ssh

Or you can build the Centreon SSH Connector. You will need the following external dependencies:

  • a C++ compilation environment.
  • CMake (>= 2.8), a cross-platform build system.
  • Centreon Clib, The centreon Core library.
  • ssh2 library to use ssh functions.
  • gcrypt library to secure connections.

This program is compatible only with Unix-like platforms (Linux, FreeBSD, Solaris, ...).

Prerequisites
CentOS
Debian/Ubuntu
OpenSUSE

In CentOS you need to add manually cmake. After that you can install binary packages. Either use the Package Manager or the yum tool to install them. You should check packages version when necessary.

Package required to build:

SoftwarePackage NameDescription
C++ compilation environmentgcc gcc-c++ makeMandatory tools to compile.
CMake (>= 2.8)cmakeRead the build script and prepare sources for compilation.
Centreon Clib (>= 1.0)centreon-clib-develCore library used by Centreon Connector.
ssh2 librarylibssh2-develSSH library.
gcrypt librarylibgcrypt-develGcrypt library.
  1. Install basic compilation tools
yum install gcc gcc-c++ make libssh2-devel libgcrypt-devel
  1. Install cmake
yum install cmake
  1. Install Centreon Clib

See the Centreon Clib @TODO@:ref:documentation <centreon-clib:centreon_clib_install>.

In recent Debian/Ubuntu versions, necessary software is available as binary packages from distribution repositories. Either use the Package Manager or the apt-get tool to install them. You should check packages version when necessary.

Package required to build:

SoftwarePackage NameDescription
C++ compilation environmentbuild-essentialMandatory tools to compile.
CMake (>= 2.8)cmakeRead the build script and prepare sources for compilation.
Centreon Clib (>= 1.0)centreon-clib-develCore library used by Centreon Connector.
ssh2 librarylibssh2-1-devSSH library.
gcrypt librarylibgcrypt11-devGcrypt library.
  1. Install compilation tools
apt-get install build-essential cmake libssh2-1-dev libgcrypt11-dev
  1. Install Centreon Clib

See the Centreon Clib @TODO@:ref:documentation <centreon-clib:centreon_clib_install>.

In recent OpenSUSE versions, necessary software is available as binary packages from OpenSUSE repositories. Either use the Package Manager or the zypper tool to install them. You should check packages version when necessary.

Package required to build:

SoftwarePackage NameDescription
C++ compilation environmentgcc gcc-c++ makeMandatory tools to compile.
CMake (>= 2.8)cmakeRead the build script and prepare sources for compilation.
Centreon Clib (>= 1.0)centreon-clib-develCore library used by Centreon Connector.
ssh2 librarylibssh2-develSSH library.
gcrypt librarylibgcrypt-develGcrypt library.
  1. Install compilation tools
zypper install gcc gcc-c++ make cmake libssh2-devel libgcrypt-devel
  1. Install Centreon Clib

See the Centreon Clib @TODO@:ref:documentation <centreon-clib:centreon_clib_install>.

Build
Get sources

Centreon SSH Connector can be checked out from GitHub. The SSH connector sources reside in the ssh subdirectory. On a Linux box with git installed this is just a matter of:

git clone https://github.com/centreon/centreon-connectors
Configuration

At the root of the project directory you'll find a ssh/build directory which holds build scripts. Generate the Makefile by running the following command:

cd /path_to_centreon_connector/ssh/build

Your Centreon SSH Connector can be tweaked to your particular needs using CMake's variable system. Variables can be set like this:

cmake -D<variable1>=<value1> [-D<variable2>=<value2>] .

Here's the list of variables available and their description:

VariableDescriptionDefault value
WITH_CENTREON_CLIB_INCLUDE_DIRSet the directory path of centreon-clib include.auto detection
WITH_CENTREON_CLIB_LIBRARIESSet the centreon-clib library to use.auto detection
WITH_CENTREON_CLIB_LIBRARY_DIRSet the centreon-clib library directory (don't use it if you use WITH_CENTREON_CLIB_LIBRARIES)auto detection
WITH_KNOWN_HOSTS_CHECKEnable or disable Check hosts against user's known_hosts file.OFF
WITH_LIBGCRYPT_INCLUDE_DIRSet the directory path of libgcrypt include.auto detection
WITH_LIBGCRYPT_LIBRARIESSet the libgcrypt library to use.auto detection
WITH_LIBGCRYPT_LIBRARY_DIRSet the libgcrypt library directory (don't use it if you use WITH_LIBGCRYPT_LIBRARIES)auto detection
WITH_LIBSSH2_INCLUDE_DIRSet the directory path of libssh2 include.auto detection
WITH_LIBSSH2_LIBRARIESSet the libssh2 library to use.auto detection
WITH_LIBSSH2_LIBRARY_DIRSet the libssh2 library directory (don't use it if you use WITH_LIBSSH2_LIBRARIES)auto detection
WITH_PREFIXBase directory for Centreon SSH Connector installation. If other prefixes are expressed as relative paths, they are relative to this path./usr/local
WITH_PREFIX_BINARYDefine specific directory for Centreon Connector SSH binary.${WITH_PREFIX}/bin
WITH_TESTINGEnable generation of unit tests. They can later be run by typing make test. OFF

Example

cmake \
    -DWITH_PREFIX=/usr \
    -DWITH_PREFIX_BINARY=/usr/lib/centreon-connector \
    -DWITH_TESTING=0 .

At this step, the software will check for existence and usability of the rerequisites. If one cannot be found, an appropriate error message will be printed. Otherwise an installation summary will be printed.

If you need to change the options you used to compile your software, you might want to remove the CMakeCache.txt file that is in the build directory. This will remove cache entries that might have been computed during the last configuration step.

Compilation

Once properly configured, the compilation process is really simple:

make

And wait until compilation completes.

Install

Once compiled, the following command must be run as privileged user to finish installation:

make install

And wait for its completion.

Configuration

Centreon SSH Connector itself does not require any configuration. It should only be configured as a connector of Centreon Engine.

To execute SSH check over SSH with Centreon SSH Connector from Centreon Engine, one might configure commands that relates to SSH check (like check_by_ssh).

Binary arguments

These arguments are centreon_connector_ssh options.

Short nameLong nameDescription
-d--debugIf this flag is specified, print all logs messages.
-h--helpPrint help and exit.
-v--versionPrint software version and exit.
Check arguments

These arguments are checks options (like check_by_ssh options).

Short nameLong nameDescription
-1--proto1This option is not supported.
-2--proto2Tell ssh to use Protocol 2.
-4--use-ipv4Enable IPv4 connection.
-6--use-ipv6Enable IPv6 connection.
-a--authenticationAuthentication password.
-C--commandCommand to execute on the remote machine.
-E--skip-stderrIgnore all or first n lines on STDERR.
-f--forkThis option is not supported.
-h--helpNot used.
-H--hostnameHost name, IP Address.
-i--identityIdentity of an authorized key.
-l--lognameSSH user name on remote host.
-n--nameThis option is not supported.
-o--ssh-optionThis option is not supported.
-O--outputThis option is not supported.
-p--portPort number (default 22).
-q--quietNot used.
-s--servicesThis option is not supported.
-S--skip-stdoutIgnore all or first n lines on STDOUT.
-t--timeoutSeconds before connection times out (default 10).
-v--verboseNot used.
-V--versionNot used.

Example:

define connector{
    connector_name centreon_connector_ssh
    connector_line /usr/bin/centreon-connector/centreon_connector_ssh
}

define command{
    command_name ssh_check_cpu
    command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -l $_HOSTUSER$ -a $_HOSTPASSWORD$ -C "$USER1$/check_cpu -w $ARG1$ -c $ARG2$"
    connector centreon_connector_ssh
}

define command{
    command_name ssh_check_disk
    command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -l $_HOSTUSER$ -a $_HOSTPASSWORD$ -C "$USER1$/check_disk -D $ARG1$ -w $ARG2$ -c $ARG3$"
    connector centreon_connector_ssh
}
Technical details

This article describes how Centreon SSH Connector allow much gain on SSH check execution.

One major CPU-intensive and long operation in a SSH environment is the key exchange and verification mechanism. This operation occurs when a SSH session is started between two hosts. After this step all exchange operations are using far less resources.

Centreon SSH Connector take advantage of this fact and maintain semi-permanent connection with hosts to which it had to connect to. This way if multiple checks are performed on the same host, where "check_by_ssh" opens one session for each check, Centreon Connector SSH only opens one session. However this does not limit the number of concurrent checks on a host, as the SSH protocol allows multiple channels to be opened on the same session. Therefore if multiple checks are run on the same host simultaneously, they are executed concurrently but with separate execution environment.

Perl connector

Centreon Perl Connector is a free software from Centreon available under the Apache Software License version 2 (ASL 2.0). It speeds up execution of Perl scripts when used along Centreon Engine.

Installation

Centreon recommends using its official packages. Most of Centreon’ endorsed software are available as RPM packages.

Run the following commands as privileged user:

yum install centreon-connector-perl

Or you can build the Centreon SSH Connector. You will need the following external dependencies:

  • a C++ compilation environment.
  • CMake (>= 2.8), a cross-platform build system.
  • Centreon Clib, The centreon Core library.
  • ssh2 library to use ssh functions.
  • gcrypt library to secure connections.

This program is compatible only with Unix-like platforms (Linux, FreeBSD, Solaris, ...).

Prerequisites
CentOS
Debian/Ubuntu
OpenSUSE

In CentOS you need to add manually cmake. After that you can install binary packages. Either use the Package Manager or the yum tool to install them. You should check packages version when necessary.

Package required to build:

SoftwarePackage NameDescription
C++ compilation environmentgcc gcc-c++ makeMandatory tools to compile.
CMake (>= 2.8)cmakeRead the build script and prepare sources for compilation.
Centreon Clib (>= 1.0)centreon-clib-develCore library used by Centreon Connector.
PerlperlScripting language.
  1. Install basic compilation tools
yum install gcc gcc-c++ make perl
  1. Install cmake
yum install cmake
  1. Install Centreon Clib

See the Centreon Clib @TODO@:ref:documentation <centreon-clib:centreon_clib_install>.

In recent Debian/Ubuntu versions, necessary software is available as binary packages from distribution repositories. Either use the Package Manager or the apt-get tool to install them. You should check packages version when necessary.

Package required to build:

SoftwarePackage NameDescription
C++ compilation environmentbuild-essentialMandatory tools to compile.
CMake (>= 2.8)cmakeRead the build script and prepare sources for compilation.
Centreon Clib (>= 1.0)centreon-clib-develCore library used by Centreon Connector.
Perllibperl-devScripting language.
  1. Install compilation tools
apt-get install build-essential cmake libperl-dev
  1. Install Centreon Clib

See the Centreon Clib @TODO@:ref:documentation <centreon-clib:centreon_clib_install>.

In recent OpenSUSE versions, necessary software is available as binary packages from OpenSUSE repositories. Either use the Package Manager or the zypper tool to install them. You should check packages version when necessary.

Package required to build:

SoftwarePackage NameDescription
C++ compilation environmentgcc gcc-c++ makeMandatory tools to compile.
CMake (>= 2.8)cmakeRead the build script and prepare sources for compilation.
Centreon Clib (>= 1.0)centreon-clib-develCore library used by Centreon Connector.
PerlperlScripting language.
  1. Install compilation tools
zypper install gcc gcc-c++ make cmake perl
  1. Install Centreon Clib

See the Centreon Clib @TODO@:ref:documentation <centreon-clib:centreon_clib_install>.

Build
Get sources

Centreon Perl Connector can be checked out from GitHub. The Perl connector sources reside in the perl subdirectory. On a Linux box with git installed this is just a matter of:

git clone https://github.com/centreon/centreon-connectors
Configuration

At the root of the project directory you'll find a perl/build directory which holds build scripts. Generate the Makefile by running the following command:

cd /path_to_centreon_connector/perl/build

Your Centreon Perl Connector can be tweaked to your particular needs using CMake's variable system. Variables can be set like this:

cmake -D<variable1>=<value1> [-D<variable2>=<value2>] .

Here's the list of variables available and their description:

VariableDescriptionDefault value
WITH_CENTREON_CLIB_INCLUDE_DIRSet the directory path of centreon-clib include.auto detection
WITH_CENTREON_CLIB_LIBRARIESSet the centreon-clib library to use.auto detection
WITH_CENTREON_CLIB_LIBRARY_DIRSet the centreon-clib library directory (don't use it if you use WITH_CENTREON_CLIB_LIBRARIES)auto detection
WITH_PREFIXBase directory for Centreon PErl Connector installation. If other prefixes are expressed as relative paths, they are relative to this path./usr/local
WITH_PREFIX_BINARYDefine specific directory for Centreon Connector Perl binary.${WITH_PREFIX}/bin
WITH_TESTINGEnable generation of unit tests. They can later be run by typing make test.OFF

Example

cmake \
    -DWITH_PREFIX=/usr \
    -DWITH_PREFIX_BINARY=/usr/lib/centreon-connector \
    -DWITH_TESTING=0 .

At this step, the software will check for existence and usability of the rerequisites. If one cannot be found, an appropriate error message will be printed. Otherwise an installation summary will be printed.

If you need to change the options you used to compile your software, you might want to remove the CMakeCache.txt file that is in the build directory. This will remove cache entries that might have been computed during the last configuration step.

Compilation

Once properly configured, the compilation process is really simple:

make

And wait until compilation completes.

Install

Once compiled, the following command must be run as privileged user to finish installation:

make install

And wait for its completion.

Configuration

Centreon Perl Connector itself does not require any configuration. It should only be configured as a connector of Centreon Engine.

To execute Perl scripts with Centreon Perl Connector from Centreon Engine, one might configure commands that relates to Perl scripts. Such commands must only contain the path to the Perl script to execute followed by its arguments, just like one would on the command line. To make it simple, you just have to add a connector property to your command definition.

Binary arguments

These arguments are centreon_connector_perl options.

Short nameLong nameDescription
-d--debugIf this flag is specified, print all logs messages.
-h--helpPrint help and exit.
-v--versionPrint software version and exit.

Example:

define connector{
    connector_name centreon_connector_perl
    connector_line /usr/bin/centreon-connector/centreon_connector_perl
}

define command{
    command_name check_ping
    command_line $USER1$/check_ping.pl -H $HOSTADDRESS$
    connector centreon_connector_perl
}

define command{
    command_name check_disk
    command_line $USER1$/check_disk.pl -H $HOSTADDRESS$ -D $ARG1$
    connector centreon_connector_perl
}
Technical details

This article describes how Centreon Perl Connector allow much gain on Perl script execution.

First of all let's examine how a Perl script is executed traditionnally by Centreon Engine.

  • Centreon Engine forks, creating a new separate process.
  • This new process executes the execve syscall to run the Perl interpreter. This step does not create a new process.
  • The Perl interpreter parse the Perl script.
  • Perl script get executed.

With Centreon Engine, the same script get executed multiple times but with different arguments. Therefore we took advantage of this fact to efficiently parse all the scripts once and get them executed. This was only possible because of the fork()ing system of Unix-like platform. If you read the reference page on Wikipedia you indeed remarked that once fork()ed the old and the new process are identical. Centreon Connector Perl's steps to execute scripts are as follow.

  • Centreon Engine creates a resident process of Centreon Connector Perl once
  • For all Perl scripts execution requests are forwarded to this process when requested to execute a script, Centreon Perl Connector checks if this script has already been parsed if not it parses it using the Embedded Perl interpreter.
  • Centreon Perl Connector forks itself.
  • The precompiled script gets executed

This way Perl scripts are only parsed once during the lifetime of the monitoring engine. This heavily relates to prepared statements in SQL.

← MacrosTime periods →
  • Definition
  • Adding a command
  • Configuration fields
  • Arguments and macros
  • Connectors
    • SSH connector
    • Perl connector
Centreon documentation
Documentation
Getting StartedAPI ReferencesReleases
Resources
Centreon WebsiteBlogDownload
Follow us
centreon
Follow @Centreon
Copyright © 2005 - 2021 Centreon