In order to migrate from icinga1 to icinga2, I'm basically concerned about the NRPE custom checks, till the time i tried to add just the basic memory check using NRPE.
With command line everything seems to be fine and perfect.
/usr/lib64/nagios/plugins/check_nrpe -H 192.186.113.45 -p 5666 -c CheckMEM -a MaxWarn=80% MaxCrit=90% ShowAll=long type=physical
Output:
OK: physical memory: Total: 64G - Used: 4.69G (7%) - Free: 59.3G (93%)|'physical memory %'=7%;80;90 'physical memory'=4.687G;51.174;57.57;0;63.967
But when I tried to apply the same with ICINGAweb2 it doesn't work well.
It simply gives me the error there as
Unknown argument: -c
Below are the configurations for the command i tried to create as a beginner.
My command.conf file has certain part defined for the same specific check
object CheckCommand "nrpe-check-1arg" {
import "plugin-check-command"
command = [PluginDir + "/check_nrpe" ]
arguments = {
"-H" = "$host$"
"-p" = "$port$"
"-c" = "$check$"
"-a" = "$argument$"
}
}
and my hostfile.conf contains
object Host "RenamedHost" {
address = "192.186.113.45"
check_command = "hostalive"
vars.os = "windows"
}
object Service "NRPE check load" {
import "generic-service"
host_name = "RenamedHost"
check_command = "nrpe-check-1arg"
vars.host = "132.186.119.45"
vars.port = "5666"
vars.check = "CheckMem"
vars.argument = "MaxWarn=80% MaxCrit=90% ShowAll=long type=physical"
}
What am I doing wrong ??
You will be able to pass the argument into nrpe.cfg as
And in command CheckMEM in remote machine you can specify the argument as