[Help] check_process_memory.sh configuration
-
sh.shekhar89
- Posts: 52
- Joined: Fri Oct 10, 2014 3:17 pm
[Help] check_process_memory.sh configuration
Hi Friends,
I am configuring check_process_memory.sh in my nagios server.
but i am getting following error and also no out put is returned [screenshot attached] :
"
[root@nagios libexec]# ./check_process_memory.sh -H 192.168.160.129 -P nscp.exe -w 5000 -c 6000
(standard_in) 1: illegal character: R
(standard_in) 1: illegal character: I
(standard_in) 1: illegal character: T
(standard_in) 1: illegal character: I
(standard_in) 1: syntax error
(standard_in) 1: illegal character: L
(standard_in) 1: illegal character: S
(standard_in) 1: syntax error
./check_process_memory.sh: line 67: [: -ge: unary operator expected
./check_process_memory.sh: line 71: [: -ge: unary operator expected
OK: Used Memory of nscp.exe: MB|UsedMemory=;5000;6000;;
"
I am attaching the configuration file.
can some one tell me why i am getting this error ??
I am configuring check_process_memory.sh in my nagios server.
but i am getting following error and also no out put is returned [screenshot attached] :
"
[root@nagios libexec]# ./check_process_memory.sh -H 192.168.160.129 -P nscp.exe -w 5000 -c 6000
(standard_in) 1: illegal character: R
(standard_in) 1: illegal character: I
(standard_in) 1: illegal character: T
(standard_in) 1: illegal character: I
(standard_in) 1: syntax error
(standard_in) 1: illegal character: L
(standard_in) 1: illegal character: S
(standard_in) 1: syntax error
./check_process_memory.sh: line 67: [: -ge: unary operator expected
./check_process_memory.sh: line 71: [: -ge: unary operator expected
OK: Used Memory of nscp.exe: MB|UsedMemory=;5000;6000;;
"
I am attaching the configuration file.
can some one tell me why i am getting this error ??
- Attachments
-
check_process_memory.sh- Plugin
- (2.28 KiB) Downloaded 425 times
-
sh.shekhar89
- Posts: 52
- Joined: Fri Oct 10, 2014 3:17 pm
Re: [Help] check_process_memory.sh configuration
Can any one help me on this?? 
Re: [Help] check_process_memory.sh configuration
This plugin is actually running check_nt, which is actually a windows checking utility:
Is there a reason why you are not just running the check directly with check_nt?command="\\$perfcount_name($process)\\$perfcount_value"
memory=`$pluginpath/check_nt -H $hostname -p $port -v COUNTER -l "$command" | tr -d '\n'`
mb=`echo "scale=0; $memory/1024000"|bc -l`
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
sh.shekhar89
- Posts: 52
- Joined: Fri Oct 10, 2014 3:17 pm
Re: [Help] check_process_memory.sh configuration
Hi abrist,
How i can fix this issue and can configure?
How i can fix this issue and can configure?
Re: [Help] check_process_memory.sh configuration
Could you answer my previous question:
Also, do you have a password configured for your nsclient connection?abrist wrote:Is there a reason why you are not just running the check directly with check_nt?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
sh.shekhar89
- Posts: 52
- Joined: Fri Oct 10, 2014 3:17 pm
Re: [Help] check_process_memory.sh configuration
hi abrist,
I am new to nagios, i dont know the answer to your question. i was searching in google find out the solution.
And I dont have password configured to my nsclient.
I am new to nagios, i dont know the answer to your question. i was searching in google find out the solution.
And I dont have password configured to my nsclient.
Re: [Help] check_process_memory.sh configuration
First, lets make sure that you can connect to the remote host from the nagios server using check_nt. Run the following command from the cli on the nagios server:
If it does not work, check your windows nsclient ini file for password=<password>, and then try running the command with the specified password (I think it defaults to 'password'):
If that does not work, check to see if the port is open:
Also, make sure the nsclient service is running on the remote host.
Code: Select all
/usr/local/nagios/libexec/check_nt -H 192.168.160.129 -p 12489 -v CLIENTVERSIONCode: Select all
/usr/local/nagios/libexec/check_nt -H 192.168.160.129 -p 12489 -s <password> -v CLIENTVERSIONCode: Select all
nmap 192.168.160.129 -p 12489Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
sh.shekhar89
- Posts: 52
- Joined: Fri Oct 10, 2014 3:17 pm
Re: [Help] check_process_memory.sh configuration
When i run the command, i got the following output :abrist wrote:First, lets make sure that you can connect to the remote host from the nagios server using check_nt. Run the following command from the cli on the nagios server:If it does not work, check your windows nsclient ini file for password=<password>, and then try running the command with the specified password (I think it defaults to 'password'):Code: Select all
/usr/local/nagios/libexec/check_nt -H 192.168.160.129 -p 12489 -v CLIENTVERSIONIf that does not work, check to see if the port is open:Code: Select all
/usr/local/nagios/libexec/check_nt -H 192.168.160.129 -p 12489 -s <password> -v CLIENTVERSIONAlso, make sure the nsclient service is running on the remote host.Code: Select all
nmap 192.168.160.129 -p 12489
[root@nagios libexec]# ./check_nt -H 192.168.160.129 -p 12489 -v CLIENTVERSION
NSClient++ 0,4,1,73 2012-12-17
[root@nagios libexec]#
Re: [Help] check_process_memory.sh configuration
Alright, now check against a COUNTER:
Code: Select all
./check_nt -H 192.168.160.129 -p 12489 -v COUNTER -l "\\Process(explorer.exe)\\Working Set"Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
sh.shekhar89
- Posts: 52
- Joined: Fri Oct 10, 2014 3:17 pm
Re: [Help] check_process_memory.sh configuration
Hi Abrist,abrist wrote:Alright, now check against a COUNTER:Code: Select all
./check_nt -H 192.168.160.129 -p 12489 -v COUNTER -l "\\Process(explorer.exe)\\Working Set"
When I run the above command i got o in return :
[root@nagios libexec]# ./check_nt -H 192.168.160.129 -p 12489 -v COUNTER -l "\\Process(explorer.exe)\\Working Set"
0
[root@nagios libexec]#