The Telegraf agent collects metrics and computes statuses on the servers it monitors, and sends them to Centreon. Centreon's OpenTelemetry processor allows it to understand data sent in OpenTelemetry format.
Developped by InfluxDB, the Telegraf agent can be installed on Windows servers. Centreon Engine is able to send the configuration of monitored resources to the agent (existing hosts, thresholds...), so that the agent can execute checks and compute the statuses of these resources.
As they are Nagios-based, both Centreon and custom plugins are compatible with the agent. This is because Centreon's Telegraf integration is based on the native Nagios input data format.
Limitations
Due to Telegraf or Centreon constraints, the following limitations need to be considered.
- Due to Telegraf limitations, the configuration of resources known to the agent is only updated when you start or reload the agent (typically, you would do that after deploying the configuration). Technically, the agent requests an up-to-date configuration from Centreon.
- Only known metrics (i.e., the metrics for the hosts and services created in Centreon) are sent to Centreon. Metrics for unknown hosts or services are discarded.
- Only metrics and statuses are returned (no outputs).
- Network connections are one-way only: data goes from the agent to the poller. This means that a host in a DMZ will need a poller in this DMZ.
- When an enhancement or fix is released, the Centreon plugin must be re-deployed on your monitored host (there is no auto-update).
Step 1: Set up the environment
Case 1: Centreon IT-100
You need to upgrade your platform to the latest version (at least 24.04.2), including pollers.
Case 2: Centreon Business Edition (<24.04.2)
You need to set up a new platform and request a temporary licence from our team: use private message or email to fmattes@centreon.com and provide your platform fingerprint (on the Administration > Extensions > Manager page).
Case 3: Centreon Open Source
Create the following commands and templates manually.
Windows - Commands
Name | Command line |
OS-Windows-Telegraf-Agent-Certificates | $_HOSTTELEGRAFPLUGINS$/centreon_plugins.exe --plugin os::windows::local::plugin --mode certificates --filter-subject='$_SERVICEFILTERSUBJECT$' --filter-thumbprint='$_SERVICEFILTERTHUMBPRINT$' --filter-path='$_SERVICEFILTERPATH$' --unit='$_SERVICETHRESHOLDSUNIT$' --warning-certificate-expires='$_SERVICEWARNINGCERTIFICATEEXPIRES$' --critical-certificate-expires='$_SERVICECRITICALCERTIFICATEEXPIRES$' --warning-certificates-detected='$_SERVICEWARNINGCERTIFICATESDETECTED$' --critical-certificates-detected='$_SERVICECRITICALCERTIFICATESDETECTED$' $_SERVICEEXTRAOPTIONS$ |
OS-Windows-Telegraf-Agent-Host-Alive | cmd.exe /C echo Telegraf is running |
OS-Windows-Telegraf-Agent-Ntp | $_HOSTTELEGRAFPLUGINS$/centreon_plugins.exe --plugin os::windows::local::plugin --mode time --warning='$_SERVICEWARNINGOFFSET$' --critical='$_SERVICECRITICALOFFSET$' --ntp-hostname='$_SERVICENTPHOSTNAME$' --ntp-port='$_SERVICENTPPORT$' --timeout='$_SERVICETIMEOUT$' $_SERVICEEXTRAOPTIONS$ |
OS-Windows-Telegraf-Agent-Pending-Reboot | $_HOSTTELEGRAFPLUGINS$/centreon_plugins.exe --plugin os::windows::local::plugin --mode pending-reboot --warning-status='$_SERVICEWARNINGSTATUS$' --critical-status='$_SERVICECRITICALSTATUS$' --timeout='$_SERVICETIMEOUT$' $_SERVICEEXTRAOPTIONS$ |
OS-Windows-Telegraf-Agent-Sessions | $_HOSTTELEGRAFPLUGINS$/centreon_plugins.exe --plugin os::windows::local::plugin --mode sessions --language='$_HOSTSYSTEMLANGUAGE$' --timeout='$_SERVICETIMEOUT$' --warning-sessions-created='$_SERVICEWARNINGSESSIONSCREATED$' --critical-sessions-created='$_SERVICECRITICALSESSIONSCREATED$' --warning-sessions-disconnected='$_SERVICEWARNINGSESSIONSDISCONNECTED$' --critical-sessions-disconnected='$_SERVICECRITICALSESSIONSDISCONNECTED$' --warning-sessions-reconnected='$_SERVICEWARNINGSESSIONSRECONNECTED$' --critical-sessions-reconnected='$_SERVICECRITICALSESSIONSRECONNECTED$' --warning-sessions-active='$_SERVICEWARNINGSESSIONSACTIVE$' --critical-sessions-active='$_SERVICECRITICALSESSIONSACTIVE$' --warning-sessions-disconnected-current='$_SERVICEWARNINGSESSIONSDISCONNECTEDCURRENT$' --critical-sessions-disconnected-current='$_SERVICECRITICALSESSIONSDISCONNECTEDCURRENT$' $_SERVICEEXTRAOPTIONS$ |
OS-Windows-Telegraf-Agent-Updates | $_HOSTTELEGRAFPLUGINS$/centreon_plugins.exe --plugin os::windows::local::plugin --mode updates --timeout='$_SERVICETIMEOUT$' --warning-pending-updates='$_SERVICEWARNINGPENDINGUPDATES$' --critical-pending-updates='$_SERVICECRITICALPENDINGUPDATES$' $_SERVICEEXTRAOPTIONS$ |
Windows - Host Template
Name | Alias | Templates | Check Command |
---|---|---|---|
OS-Windows-Telegraf-Agent | Windows Telegraf Agent device | generic-active-host | OS-Windows-Telegraf-Agent-Host-Alive |
Windows - Service Templates
Alias | Name | Template | Check command |
---|---|---|---|
Certificates | OS-Windows-Telegraf-Certificates-Agent | generic-active-service | OS-Windows-Telegraf-Agent-Certificates |
Ntp | OS-Windows-Telegraf-Ntp-Agent | generic-active-service | OS-Windows-Telegraf-Agent-Ntp |
Pending-Reboot | OS-Windows-Telegraf-Pending-Reboot-Agent | generic-active-service | OS-Windows-Telegraf-Agent-Pending-Reboot |
Sessions | OS-Windows-Telegraf-Sessions-Agent | generic-active-service | OS-Windows-Telegraf-Agent-Sessions |
Updates | OS-Windows-Telegraf-Updates-Agent | generic-active-service | OS-Windows-Telegraf-Agent-Updates |
Linux - Commands
Name | Command line |
OS-Linux-Telegraf-Agent-Host-Alive | /usr/bin/echo Host alive |
OS-Linux-Telegraf-Agent-CmdReturn | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='cmd-return' --exec-command='$_SERVICECOMMAND$' --exec-command-options='$_SERVICECOMMANDOPTIONS$' --manage-returns='$_SERVICETHRESHOLDS$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Connections | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='connections' $_HOSTTELEGRAFEXTRAOPTIONS$ --warning='$_SERVICEWARNING$' --critical='$_SERVICECRITICAL$' --con-mode='$_SERVICECONNECTIONCOMMAND$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Cpu | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='cpu' $_HOSTTELEGRAFEXTRAOPTIONS$ --warning-core='$_SERVICEWARNINGCORE$' --critical-core='$_SERVICECRITICALCORE$' --warning-average='$_SERVICEWARNINGAVERAGE$' --critical-average='$_SERVICECRITICALAVERAGE$' --statefile-dir='$_HOSTTELEGRAFSTATEFILEDIR$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Cpu-Detailed | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='cpu-detailed' --statefile-dir='$_HOSTTELEGRAFSTATEFILEDIR$' $_HOSTTELEGRAFEXTRAOPTIONS$ --warning-idle='$_SERVICEWARNINGIDLE$' --critical-idle='$_SERVICECRITICALIDLE$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Diskio | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='diskio' --statefile-dir='$_HOSTTELEGRAFSTATEFILEDIR$' --filter-partition-name='$_SERVICEFILTERPARTITIONAME$' --warning-read-usage='$_SERVICEWARNINGREADUSAGE$' --critical-read-usage='$_SERVICECRITICALREADUSAGE$' --warning-write-usage='$_SERVICEWARNINGWRITEUSAGE$' --critical-write-usage='$_SERVICECRITICALWRITEUSAGE$' --warning-read-wait='$_SERVICEWARNINGREADWAIT$' --critical-read-wait='$_SERVICECRITICALREADWAIT$' --warning-write-wait='$_SERVICEWARNINGWRITEWAIT$' --critical-write-wait='$_SERVICECRITICALWRITEWAIT$' --warning-svctime='$_SERVICEWARNINGSVCTIME$' --critical-svctime='$_SERVICECRITICALSVCTIME$' --warning-utils='$_SERVICEWARNINGUTILS$' --critical-utils='$_SERVICECRITICALUTILS$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Disks | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='storage' --filter-mountpoint='$_SERVICEFILTERMOUNTPOINT$' --warning-usage='$_SERVICEWARNING$' --critical-usage='$_SERVICECRITICAL$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-FileDate | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='files-date' --files='$_SERVICEFILES$' --warning='$_SERVICEWARNING$' --critical='$_SERVICECRITICAL$' --filter-plugin='$_SERVICEFILTERPLUGIN$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-FileSize | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='files-size' --files='$_SERVICEFILES$' --warning-one='$_SERVICEWARNINGONE$' --critical-one='$_SERVICECRITICALONE$' --warning-total='$_SERVICEWARNINGTOTAL$' --critical-total='$_SERVICECRITICALTOTAL$' --filter-plugin='$_SERVICEFILTERPLUGIN$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Inodes | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='inodes' --filter-mountpoint='$_SERVICEFILTERMOUNTPOINT$' --warning-usage='$_SERVICEWARNING$' --critical-usage='$_SERVICECRITICAL$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-IsFile | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='cmd-return' --exec-command='$_SERVICECOMMAND$' --exec-command-options='-f $_SERVICEFILE$' --manage-returns='0,OK,File $_SERVICEFILE$ is present#1,CRITICAL,File $_SERVICEFILE$ is not present#,UNKNOWN,Command problem' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-IsNotFile | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='cmd-return' --exec-command='$_SERVICECOMMAND$' --exec-command-options='-f $_SERVICEFILE$' --manage-returns='0,CRITICAL,File $_SERVICEFILE$ is present#1,OK,File $_SERVICEFILE$ is not present#,UNKNOWN,Command problem' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Load | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='load' --warning='$_SERVICEWARNING$' --critical='$_SERVICECRITICAL$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Memory | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='memory' --warning='$_SERVICEWARNING$' --critical='$_SERVICECRITICAL$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Open-Files | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='open-files' --filter-appname='$_SERVICEFILTERAPPNAME$' --filter-username='$_SERVICEFILTERUSERNAME$' --filter-pid='$_SERVICEFILTERPID$' --warning-files-open='$_SERVICEWARNING$' --critical-files-open='$_SERVICECRITICAL$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Packet-Errors | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='packet-errors' --statefile-dir='$_HOSTTELEGRAFSTATEFILEDIR$' --filter-interface='$_SERVICEFILTERINTERFACE$' --warning-in-error='$_SERVICEWARNINGINERROR$' --critical-in-error='$_SERVICECRITICALINERROR$' --warning-out-error='$_SERVICEWARNINGOUTERROR$' --critical-out-error='$_SERVICECRITICALOUTERROR$' --warning-in-discard='$_SERVICEWARNINGINDISCARD$' --critical-in-discard='$_SERVICECRITICALINDISCARD$' --warning-out-discard='$_SERVICEWARNINGOUTDISCARD$' --critical-out-discard='$_SERVICECRITICALOUTDISCARD$' --filter-state='$_SERVICEFILTERSTATE$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Pending-Updates | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='pending-updates' --os-mode='$_SERVICEOSMODE$' --filter-package='$_SERVICEFILTERPACKAGE$' --filter-repository='$_SERVICEFILTERREPOSITORY$' --warning-total='$_SERVICEWARNINGTOTAL$' --critical-total='$_SERVICECRITICALTOTAL$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Process-Generic | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='process' --statefile-dir='$_HOSTTELEGRAFSTATEFILEDIR$' --warning-total=$_SERVICEWARNINGTOTAL$ --critical-total=$_SERVICECRITICALTOTAL$ --warning-time=$_SERVICEWARNINGTIME$ --critical-time=$_SERVICECRITICALTIME$ --filter-command='$_SERVICEFILTERCOMMAND$' --filter-arg='$_SERVICEFILTERARG$' --filter-state='$_SERVICEFILTERSTATE$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Swap | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='swap' --warning-usage-prct='$_SERVICEWARNING$' --critical-usage-prct='$_SERVICECRITICAL$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Systemd-Journal | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='systemd-journal' --statefile-dir='$_HOSTTELEGRAFSTATEFILEDIR$' --unit='$_SERVICEUNIT$' --filter-message='$_SERVICEFILTERMESSAGE$' --since='$_SERVICESINCE$' --timezone='$_SERVICETIMEZONE$' --warning-entries='$_SERVICEWARNINGENTRIES$' --critical-entries='$_SERVICECRITICALENTRIES$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Systemd-Sc-Status | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='systemd-sc-status' --filter-name='$_SERVICEFILTERNAME$' --exclude-name='$_SERVICEEXCLUDENAME$' --warning-status='$_SERVICEWARNINGSTATUS$' --critical-status='$_SERVICECRITICALSTATUS$' --warning-total-running='$_SERVICEWARNINGTOTALRUNNING$' --critical-total-running='$_SERVICECRITICALTOTALRUNNING$' --warning-total-failed='$_SERVICEWARNINGTOTALFAILED$' --critical-total-failed='$_SERVICECRITICALTOTALFAILED$' --warning-total-dead='$_SERVICEWARNINGTOTALDEAD$' --critical-total-dead='$_SERVICECRITICALTOTALDEAD$' --warning-total-exited='$_SERVICEWARNINGTOTALEXITED$' --critical-total-exited='$_SERVICECRITICALTOTALEXITED$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Traffic | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='traffic' --statefile-dir='$_HOSTTELEGRAFSTATEFILEDIR$' --filter-interface='$_SERVICEFILTERINTERFACE$' --warning-in='$_SERVICEWARNINGIN$' --critical-in='$_SERVICECRITICALIN$' --warning-out='$_SERVICEWARNINGOUT$' --critical-out='$_SERVICECRITICALOUT$' --filter-state='$_SERVICEFILTERSTATE$' --speed='$_SERVICESPEED$' $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Uptime | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='uptime' $_HOSTTELEGRAFEXTRAOPTIONS$ --warning=$_SERVICEWARNING$ --critical=$_SERVICECRITICAL$ $_SERVICEEXTRAOPTIONS$ |
OS-Linux-Telegraf-Agent-Ntp | $_HOSTTELEGRAFPLUGINS$/centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='ntp' --ntp-mode='$_SERVICENTPCOMMAND$' --filter-name='$_SERVICEFILTERPEERNAME$' --filter-state='$_SERVICEFILTERPEERSTATE$' --warning-status='$_SERVICEWARNINGSTATUS$' --critical-status='$_SERVICECRITICALSTATUS$' --warning-offset='$_SERVICEWARNINGOFFSET$' --critical-offset='$_SERVICECRITICALOFFSET$' --warning-stratum='$_SERVICEWARNINGSTRATUM$' --critical-stratum='$_SERVICECRITICALSTRATUM$' --warning-peers='$_SERVICEWARNINGPEERS$' --critical-peers='$_SERVICECRITICALPEERS$' $_SERVICEEXTRAOPTIONS$ |
Linux - Host Template
Name | Alias | Templates | Check Command |
---|---|---|---|
OS-Linux-Telegraf-Agent | Telegraf Opentelemetry agent | generic-active-host | OS-Linux-Telegraf-Agent-Host-Alive |
Linux - Service Templates
Alias | Name | Template | Host template | Check command |
---|---|---|---|---|
Cpu | OS-Linux-Cpu-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent | OS-Linux-Telegraf-Agent-Cpu |
Load | OS-Linux-Load-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent | OS-Linux-Telegraf-Agent-Load |
Memory | OS-Linux-Memory-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent | OS-Linux-Telegraf-Agent-Memory |
Ntp | OS-Linux-Ntp-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent | OS-Linux-Telegraf-Agent-Ntp |
Swap | OS-Linux-Swap-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent | OS-Linux-Telegraf-Agent-Swap |
Uptime | OS-Linux-Uptime-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent | OS-Linux-Telegraf-Agent-Uptime |
Cpu-Detailed | OS-Linux-Cpu-Detailed-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent | OS-Linux-Telegraf-Agent-Cpu-Detailed |
Disks | OS-Linux-Disks-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent | OS-Linux-Telegraf-Agent-Disks |
Inodes | OS-Linux-Inodes-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent | OS-Linux-Telegraf-Agent-Inodes |
Pending-Updates | OS-Linux-Pending-Updates-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent | OS-Linux-Telegraf-Agent-Pending-Updates |
Cmd-Generic | OS-Linux-Cmd-Generic-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent-CmdReturn | |
Connections-Generic | OS-Linux-Connections-Generic-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent-Connections | |
Disk-IO | OS-Linux-Disk-IO-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent-Diskio | |
File-Date-Generic | OS-Linux-File-Date-Generic-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent-FileDate | |
File-Size-Generic | OS-Linux-File-Size-Generic-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent-FileSize | |
Is-File-Generic | OS-Linux-Is-File-Generic-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent-IsFile | |
Is-Not-File-Generic | OS-Linux-Is-Not-File-Generic-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent-IsNotFile | |
Open-Files | OS-Linux-Open-Files-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent-Open-Files | |
Packet-Errors | OS-Linux-Packet-Errors-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent-Packet-Errors | |
Process-Generic | OS-Linux-Process-Generic-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent-Process-Generic | |
Systemd-Journal | OS-Linux-Systemd-Journal-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent-Systemd-Journal | |
Systemd-Sc-Status | OS-Linux-Systemd-Sc-Status-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent-Systemd-Sc-Status | |
Traffic | OS-Linux-Traffic-Telegraf-Agent | generic-active-service | OS-Linux-Telegraf-Agent-Traffic |
Case 4: Centreon Cloud
You need to update/upgrade your poller.
Step 2: Install the agent and the Centreon plugins on the host
Download and install the agent on the host
Windows Host
- Download the agent on all the servers you want to monitor.
- Install the agent on the servers using the following command (replace the placeholders by your values):
.\telegraf.exe --service install --config "http(s)://<ip_poller>:<port poller>/engine?host=<host_to_monitor>"
The arguments in this command will allow Telegraf to know where to fetch the configuration of the resources that it must monitor (i.e on the poller or the central, according to the IP address you have entered in the command). The <host_to_monitor>
parameter is the name of the host as you entered it in the Name field in its configuration.
Linux Host
- Download the agent on all the servers you want to monitor.
- Stop Telegraf service
systemctl stop telegraf
- Modify telegraf.service (replace the placeholders by your values):
Replace
/usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d $TELEGRAF_OPTS
By
/usr/bin/telegraf -config http(s)://<ip poller>:<port poller>/engine?host=<host to monitor>
- Start Telegraf service
systemctl start telegraf
The arguments in this command will allow Telegraf to know where to fetch the configuration of the resources that it must monitor (i.e on the poller or the central, according to the IP address you have entered in the command). The <host_to_monitor>
parameter is the name of the host as you entered it in the Name field in its configuration.
Deploy the Centreon plugin on the host
The Centreon plugin will execute the checks on the host.
On the hosts you want to monitor, download and execute the corresponding package for Windows or Linux.
Step 3: Configure Centreon
Install the monitoring connector that will receive data from Telegraf
- On your central server, go to Configuration > Monitoring Connector Manager.
- Install the Windows Telegraf Agent monitoring connector.
Create the Telegraf connector
Install the Open Telemetry processor for Telegraf on your central server:
- Go to Configuration > Commands > Connectors.
- Create a new connector with the following values:
Parameter | Value |
---|---|
Connector Name | Telegraf |
Connector Description | Telegraf |
Command Line | opentelemetry --processor=nagios_telegraf --extractor=attributes --host_path=resource_metrics.scope_metrics.data.data_points.attributes.host --service_path=resource_metrics.scope_metrics.data.data_points.attributes.service |
Used by command |
|
Connector Status | Enabled |
Configure Engine
-
On the poller that will receive the data from the agent, create the following file:
touch /etc/centreon-engine/otl_server.json
-
Enter the following contents. This will allow the poller to receive the data that the agent will send.
- Unencrypted flows
- Encrypted flows
- Enter the IP address of the poller in the service_address field.
- The interval field is the frequency of checks performed by Telegraf, and should be set to 60 seconds as it is the frequency of Engine checks.
broker_module=/usr/lib64/centreon-engine/libopentelemetry.so /etc/centreon-engine/otl_server.json
{
"otel_server": {
"host": "0.0.0.0",
"port": 4317,
"encryption": false
},
"max_length_grpc_log": 0,
"telegraf_conf_server": {
"http_server": {
"port": 80,
"encryption": false
},
"telegraf_conf": {
"interval": "60s",
"service_address": "xxx.xxx.xxx.xxx:4317"
}
}
}
Add a new Broker module
-
Go to Configuration > Pollers > Engine configuration, then click on the poller you want to monitor your resources.
-
On the Data tab, in the Broker module section, in the Multiple Broker Module parameter, click on Add a new entry.
-
Add the following entry :
/usr/lib64/centreon-engine/libopentelemetry.so /etc/centreon-engine/otl_server.json
The Telegraf agent is now able to communicate with Centreon. You can set up the monitoring of your hosts.
Step 4: Monitoring a host with the Telegraf agent
Create hosts using templates
On the central server, create hosts and apply to them templates provided by the Windows Telegraf AGENT / Linux Telegraf AGENT monitoring connector.
Configure
Reload the agent
To let the agent know about the hosts you just created and start monitoring them, run the following command on the host:
Windows Host
telegraf.exe --service start
telegraf.exe --service stop
Linux Host