Hello friends,
I am looking for plugin which will monitor the memory usage of a single process on windows.
I found one plugin, but i am getting some code error after running the command :
plugin : http://exchange.nagios.org/directory/Pl ... ge/details
can some one help in configuring?
Please let me if is there any other plugin that will work for my requirement??
[Help] check_winproc_ram configuration
Re: [Help] check_winproc_ram configuration
Can you provide more information? What error code are you getting?
Former Nagios employee
-
- Posts: 52
- Joined: Fri Oct 10, 2014 3:17 pm
Re: [Help] check_winproc_ram configuration
Hello tmcdonald, i am getting the below error :tmcdonald wrote:Can you provide more information? What error code are you getting?
[root@test libexec]# ./check_winproc_ram -H 192.168.199.1 --warning 4000 --critical -4500 -s check_svchost_exe
./check_winproc_ram: line 172: let: WERT2=*1024: syntax error: operand expected (error token is "*1024")
./check_winproc_ram: line 179: [: -ge: unary operator expected
./check_winproc_ram: line 185: [: -ge: unary operator expected
: KB - ok|'ram'=;4096000;-4608000
[root@test libexec]#
can you help me in fixig this problem.
Re: [Help] check_winproc_ram configuration
Please run the plugin like so and share the /tmp/output.txt file:
Code: Select all
bash -x ./check_winproc_ram -H 192.168.199.1 --warning 4000 --critical -4500 -s check_svchost_exe | tee /tmp/output.txt
Former Nagios employee
-
- Posts: 52
- Joined: Fri Oct 10, 2014 3:17 pm
Re: [Help] check_winproc_ram configuration
tmcdonald wrote:Please run the plugin like so and share the /tmp/output.txt file:
Code: Select all
bash -x ./check_winproc_ram -H 192.168.199.1 --warning 4000 --critical -4500 -s check_svchost_exe | tee /tmp/output.txt
Hello tmcdonald,
here is the output when i run the above command :
[root@test libexec]# bash -x ./check_winproc_ram -H 192.168.199.1 --warning 4000 --critical -4500 -s check_svchost_exe | tee /tmp/output.txt
+ GREP=/bin/grep
+ CUT=/usr/bin/cut
+ AWK=/usr/bin/awk
+ SED=/bin/sed
+ NRPE=/usr/local/nagios/libexec/check_nrpe
++ /bin/basename ./check_winproc_ram
+ PROGNAME=check_winproc_ram
++ /bin/sed -e 's,[\/][^\/][^\/]*$,,'
++ echo ./check_winproc_ram
+ PROGPATH=.
+ REVISION='Revision 1.0'
+ AUTHOR='(c) 2009 Guenther Orth (http://www.enbiz.de/)'
+ STATE_OK=0
+ STATE_WARNING=1
+ STATE_CRITICAL=2
+ STATE_UNKNOWN=3
+ STATE_DEPENDENT=4
+ '[' 8 -lt 1 ']'
+ thresh_warn=
+ thresh_crit=
+ externalias=
+ HOSTNAME=
+ exitstatus=1
+ test -n -H
+ case "$1" in
+ HOSTNAME=192.168.199.1
+ shift
+ shift
+ test -n --warning
+ case "$1" in
+ thresh_warn=4000
+ shift
+ shift
+ test -n --critical
+ case "$1" in
+ thresh_crit=-4500
+ shift
+ shift
+ test -n -s
+ case "$1" in
+ externalias=check_svchost_exe
+ shift
+ shift
+ test -n ''
++ /bin/grep K
++ /usr/local/nagios/libexec/check_nrpe -H 192.168.199.1 -c check_svchost_exe
+ NRPERUN=
++ /usr/bin/awk '/[ 0-9\. ]/ {print $5}'
++ /bin/sed 's/\.//2'
++ echo
+ WERT=
++ /usr/bin/cut -d ' ' -f 1
++ echo
+ SERVICENAME=
+ result=ok
+ exitstatus=0
+ let 'WERT2=*1024'
./check_winproc_ram: line 172: let: WERT2=*1024: syntax error: operand expected (error token is "*1024")
+ let 'thresh_warn_KB=4000*1024'
+ let 'thresh_crit_KB=-4500*1024'
+ '[' 4000 '!=' '' ']'
+ '[' -ge 4000 ']'
./check_winproc_ram: line 179: [: -ge: unary operator expected
+ '[' -4500 '!=' '' ']'
+ '[' -ge -4500 ']'
./check_winproc_ram: line 185: [: -ge: unary operator expected
+ echo ': KB - ok|'\''ram'\''=;4096000;-4608000'
: KB - ok|'ram'=;4096000;-4608000
+ exit 0
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: [Help] check_winproc_ram configuration
So the plugin is missing some error checking, it's doing stuff to variables that are empty.
Basically the NRPERUN and WERT variables are empty.
What is the output from this command:
Basically the NRPERUN and WERT variables are empty.
What is the output from this command:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 192.168.199.1 -c check_svchost_exe|/bin/grep K
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 52
- Joined: Fri Oct 10, 2014 3:17 pm
Re: [Help] check_winproc_ram configuration
Box293 wrote:So the plugin is missing some error checking, it's doing stuff to variables that are empty.
Basically the NRPERUN and WERT variables are empty.
What is the output from this command:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 192.168.199.1 -c check_svchost_exe|/bin/grep K
When i run the above command i did not return any output box293.
Re: [Help] check_winproc_ram configuration
Could you post your nsc.ini file from your Windows Host? It should be in the following folder
Code: Select all
C:\Program Files\NSClient++
Be sure to check out our Knowledgebase for helpful articles and solutions!