Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Using Arguments in Checks won't work #32

Open
MichlMann opened this issue Aug 22, 2018 · 1 comment
Open

Using Arguments in Checks won't work #32

MichlMann opened this issue Aug 22, 2018 · 1 comment

Comments

@MichlMann
Copy link

Expected Behavior

My Call from Nagios Master:
/usr/local/nagios/libexec/check_nrpe -H 10.1.1.1 -c check_port_tcp -a localhost 19999

NRPE Config on target:
dont_blame_nrpe=1
command[check_port_tcp]=/usr/lib/nagios/plugins/check_tcp -H "$ARG1$" -p "$ARG2$"

Error Message:

service nagios-nrpe-server status
● nagios-nrpe-server.service - Nagios Remote Plugin Executor
Loaded: loaded (/lib/systemd/system/nagios-nrpe-server.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2018-08-22 17:34:37 UTC; 13min ago
Docs: http://www.nagios.org/documentation
Main PID: 18239 (nrpe)
CGroup: /system.slice/nagios-nrpe-server.service
└─18239 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f

Aug 22 17:43:28 db01 nrpe[24300]: Error: Request contained command arguments!
Client request from 10.1.1.2 was invalid, bailing out...

Google says:
This package is built without support for command argument processing. If you
want to enable it, you will have to rebuild this package with
--enable-command-args in debian/rules

But there is no Option in Puppet package nrpe
Usage:
class { 'nrpe':
allowed_hosts => ['127.0.0.1', $::ipaddress],
use_ssl => true,
dont_blame_nrpe => '1',
}

Facts:

facter -p
apt_has_updates => true
apt_package_updates => ["openssh-sftp-server", "openssh-server", "openssh-client"]
apt_reboot_required => false
apt_security_updates => 3
apt_update_last_success => -1
apt_updates => 3
architecture => amd64
augeasversion => 1.8.0
blockdevice_xvda_size => 106837311488
blockdevice_xvdb_size => 536870912
blockdevices => xvda,xvdb
env_temp_variable => /tmp
facterversion => 2.4.6
filesystems => btrfs,cramfs,ext2,ext3,ext4,gfs2,gfs2meta,iso9660,jfs,minix,msdos,reiserfs,romfs,udf,vfat,xfs
fqdn => db01.lets-bastel.de
gid => root
hardwareisa => unknown
hardwaremodel => x86_64
hostname => db01
id => root
interfaces => dummy0,eth0,eth0_0,gre0,gretap0,ip6_vti0,ip6gre0,ip6tnl0,lo,sit0,teql0,tunl0
ipaddress => 134.119.10.123
ipaddress_eth0 => 134.119.10.123
ipaddress_eth0_0 => 10.1.26.124
ipaddress_lo => 127.0.0.1
is_pe => false
is_virtual => true
kernel => Linux
kernelmajversion => 4.4
kernelrelease => 4.4.110-x86_64-jb1
kernelversion => 4.4.110
last_run => Wed Aug 22 17:51:04:775369316 UTC 2018
lsbdistcodename => stretch
lsbdistdescription => Debian GNU/Linux 9.5 (stretch)
lsbdistid => Debian
lsbdistrelease => 9.5
lsbmajdistrelease => 9
lsbminordistrelease => 5
mco_confdir => /mcollective/etc
memoryfree => 3.59 GB
memoryfree_mb => 3673.18
memorysize => 3.90 GB
memorysize_mb => 3998.23
mtu_dummy0 => 1500
mtu_eth0 => 1500
mtu_eth0_0 => 1500
mtu_gre0 => 1476
mtu_gretap0 => 1462
mtu_ip6_vti0 => 1500
mtu_ip6gre0 => 1448
mtu_ip6tnl0 => 1452
mtu_lo => 65536
mtu_sit0 => 1480
mtu_teql0 => 1500
mtu_tunl0 => 1480
(Debian 9.1)
operatingsystem => Debian
operatingsystemmajrelease => 9
operatingsystemrelease => 9.5
os => {"name"=>"Debian", "family"=>"Debian", "release"=>{"major"=>"9", "minor"=>"5", "full"=>"9.5"}, "lsb"=>{"distcodename"=>"stretch", "distid"=>"Debian", "distdescription"=>"Debian GNU/Linux 9.5 (stretch)", "distrelease"=>"9.5", "majdistrelease"=>"9", "minordistrelease"=>"5"}}
osfamily => Debian
package_provider => apt
path => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
physicalprocessorcount => 1
processor0 => Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz
processor1 => Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz
processorcount => 2
processors => {"models"=>["Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz", "Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz"], "count"=>2, "physicalcount"=>1}
ps => ps -ef
puppet_agent_pid => 29731
puppet_client_datadir => /var/cache/puppet/client_data
puppet_confdir => /etc/puppet
puppet_config => /etc/puppet/puppet.conf
puppet_environmentpath => /etc/puppet/code/environments
puppet_master_server => puppet
puppet_server => puppet
puppet_ssldir => /var/lib/puppet/ssl
puppet_sslpaths => {"privatedir"=>{"path"=>"/var/lib/puppet/ssl/private", "path_exists"=>true}, "privatekeydir"=>{"path"=>"/var/lib/puppet/ssl/private_keys", "path_exists"=>true}, "publickeydir"=>{"path"=>"/var/lib/puppet/ssl/public_keys", "path_exists"=>true}, "certdir"=>{"path"=>"/var/lib/puppet/ssl/certs", "path_exists"=>true}, "requestdir"=>{"path"=>"/var/lib/puppet/ssl/certificate_requests", "path_exists"=>true}, "hostcrl"=>{"path"=>"/var/lib/puppet/ssl/crl.pem", "path_exists"=>true}}
puppet_stringify_facts => false
puppet_vardir => /var/cache/puppet
puppetversion => 4.8.2
root_home => /root
rubyplatform => x86_64-linux-gnu
rubysitedir => /usr/local/lib/site_ruby/2.3.0
rubyversion => 2.3.3
selinux => false
service_provider => systemd
staging_http_get => curl
swapfree => 512.00 MB
swapfree_mb => 512.00
swapsize => 512.00 MB
swapsize_mb => 512.00
system_uptime => {"seconds"=>16239, "hours"=>4, "days"=>0, "uptime"=>"4:30 hours"}
timezone => UTC
uniqueid => 77867b0a
uptime => 4:30 hours
uptime_days => 0
uptime_hours => 4
uptime_seconds => 16239
vcsrepo_svn_ver =>
virtual => xenhvm

Thanks for your Support!

@alvagante
Copy link
Member

Sorry.
Actually the module is deprecated and not maintained any more.
We can develop and improve our decommissioned modules under a support contract, usable for this or any Puppet development, but I don't know if this is your case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants