A custom_check_mem error value too big.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
lee.krause
Posts: 86
Joined: Wed Jan 20, 2016 8:38 am

Re: A custom_check_mem error value too big.

Post by lee.krause »

I copied the txt file that was provided and the following is the result:

libexec # ls -al custom_check_mem
-rwx------ 1 nagios nagios 5107 Nov 1 20:45 custom_check_mem
libexec # /opt/nagios/libexec/custom_check_mem -w 20 -c 10
/opt/nagios/libexec/custom_check_mem: line 106: [: =: unary operator expected
/opt/nagios/libexec/custom_check_mem: line 110: 97G: value too great for base (error token is "97G")
/opt/nagios/libexec/custom_check_mem: line 149: [: -gt: unary operator expected
OK - 97 / 256 MB (37%) Free Memory, Used: MB, Shared: MB | total=256MB free=97MB used=MB shared=MB
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: A custom_check_mem error value too big.

Post by Box293 »

We need some more information from you. What is the output of:

Code: Select all

which top
top -n
/usr/local/bin/top -n
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
lee.krause
Posts: 86
Joined: Wed Jan 20, 2016 8:38 am

Re: A custom_check_mem error value too big.

Post by lee.krause »

# which top
/usr/bin/top
# top -n
last pid: 8103; load avg: 6.50, 5.74, 5.37; up 23+11:20:18 15:06:52
1601 processes: 1595 sleeping, 6 on cpu
CPU states: 92.5% idle, 2.9% user, 4.6% kernel, 0.0% iowait, 0.0% swap
Memory: 256G phys mem, 94G free mem, 428G total swap, 427G free swap

PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
5701 pb2adm 1 0 0 39G 3065M cpu/124 48:01 1.16% disp+work
27403 root 1 0 0 3632K 2112K cpu/45 178.4H 1.04% bash
26071 root 1 0 0 1976K 1360K cpu/12 61.9H 1.03% find
26076 root 1 0 0 1976K 1360K cpu/97 61.8H 1.03% find
20477 root 26 56 0 6440K 2992K cpu/40 28:34 0.31% syslogd
7743 orapx2 1 50 0 12G 7716M sleep 0:01 0.19% oracle
26304 orape2 11 10 0 12G 10G sleep 1:40 0.16% oracle
753 orapx2 1 30 0 12G 7726M sleep 0:05 0.16% oracle
5752 pb3adm 328 59 0 6471M 4660M sleep 31.9H 0.16% jstart
25630 orapx2 1 60 0 12G 7679M sleep 1:56 0.13% oracle
8102 root 1 21 0 6840K 5632K cpu/90 0:00 0.10% top
5363 root 6 59 0 3624K 2384K sleep 739:43 0.07% auditd
13571 orapx2 1 49 0 12G 1122M sleep 110:14 0.07% oracle
19502 orapx2 11 60 0 12G 7680M sleep 0:13 0.05% oracle
13672 orapx2 32 59 0 12G 1140M sleep 83:46 0.03% oracle

# /usr/local/bin/top -n
last pid: 8107; load avg: 6.51, 5.75, 5.37; up 23+11:20:22 15:06:56
1599 processes: 1592 sleeping, 7 on cpu
CPU states: 93.0% idle, 2.6% user, 4.4% kernel, 0.0% iowait, 0.0% swap
Memory: 256G phys mem, 94G free mem, 428G total swap, 427G free swap

PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
5701 pb2adm 1 0 0 39G 3065M cpu/124 48:05 1.13% disp+work
27403 root 1 0 0 3632K 2112K cpu/45 178.4H 1.04% bash
26071 root 1 0 0 1976K 1360K cpu/78 61.9H 1.03% find
26076 root 1 0 0 1976K 1360K cpu/117 61.8H 1.03% find
20477 root 26 58 0 6440K 2992K cpu/0 28:35 0.30% syslogd
8105 root 1 30 0 6840K 5632K cpu/92 0:00 0.10% top
753 orapx2 1 20 0 12G 7726M sleep 0:06 0.09% oracle
5363 root 6 59 0 3624K 2384K sleep 739:43 0.07% auditd
19502 orapx2 11 40 0 12G 7680M cpu/87 0:13 0.07% oracle
5752 pb3adm 328 59 0 6471M 4660M sleep 31.9H 0.05% jstart
13672 orapx2 32 59 0 12G 1140M sleep 83:46 0.03% oracle
25630 orapx2 1 50 0 12G 7699M sleep 1:56 0.02% oracle
12417 orapb2 1 38 0 45G 37G sleep 1:53 0.02% oracle
10809 pe2adm 344 59 0 6162M 5392M sleep 24.7H 0.02% jlaunch
22467 orape2 1 58 0 12G 1712M sleep 278:16 0.02% oracle
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: A custom_check_mem error value too big.

Post by rkennedy »

Just to confirm, which updated version did you use from that thread? The one @tlea posted, or @ssax posted?

Troy posted one modification, where as Sean posted another on the next page that Troy had linked here - https://support.nagios.com/forum/viewto ... 20#p187531
Former Nagios Employee
lee.krause
Posts: 86
Joined: Wed Jan 20, 2016 8:38 am

Re: A custom_check_mem error value too big.

Post by lee.krause »

I tried the one suggested in this thread. the one @Box293 posted.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: A custom_check_mem error value too big.

Post by ssax »

Please try this one and let us know if it resolves the issue:
custom_check_mem.zip
Thank you
You do not have the required permissions to view the files attached to this post.
Locked