From 7dd46f0536745bedc71489f2985e8352cc35414e Mon Sep 17 00:00:00 2001 From: Maria Haider Date: Mon, 24 May 2021 15:35:41 +0200 Subject: [PATCH] Fixed a missing file for nagios instance --- global/overlay/etc/puppet/manifests/cosmos-site.pp | 6 ++++++ .../modules/eid/templates/monitor/check_nrpe.cfg.erb | 12 ++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 global/overlay/etc/puppet/modules/eid/templates/monitor/check_nrpe.cfg.erb diff --git a/global/overlay/etc/puppet/manifests/cosmos-site.pp b/global/overlay/etc/puppet/manifests/cosmos-site.pp index 6f2513e8..9b172e86 100644 --- a/global/overlay/etc/puppet/manifests/cosmos-site.pp +++ b/global/overlay/etc/puppet/manifests/cosmos-site.pp @@ -982,6 +982,12 @@ class nagios_monitor { mode => '0600', ; } + #definition for check_nrpe_1arg + file { '/etc/nagios-plugins/config/check_nrpe.cfg': + ensure => file, + mode => '0644', + content => template('eid/monitor/check_nrpe.cfg.erb'), + } nagioscfg::slack::channel {'eln': } -> nagioscfg::contactgroup {'alerts': } -> nagioscfg::contact {'slack-alerts': diff --git a/global/overlay/etc/puppet/modules/eid/templates/monitor/check_nrpe.cfg.erb b/global/overlay/etc/puppet/modules/eid/templates/monitor/check_nrpe.cfg.erb new file mode 100644 index 00000000..ab0dba69 --- /dev/null +++ b/global/overlay/etc/puppet/modules/eid/templates/monitor/check_nrpe.cfg.erb @@ -0,0 +1,12 @@ +# this command runs a program $ARG1$ with arguments $ARG2$ +# this file is managed with puppet. +define command { + command_name check_nrpe + command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ +} + +# this command runs a program $ARG1$ with no arguments +define command { + command_name check_nrpe_1arg + command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ +} \ No newline at end of file