2 questions about plugins : check_procs & check_log

Thomas tguthmann at cvf.fr
Wed Aug 28 13:18:39 CEST 2002


Hi,

I'm running nagios 1.0b5/ nagiosplug1.3b1 on debian 3.0 (woody). 
Netsaint, oops, nagios works fine but I'm encountering problems with 
plugins usage and especially check_procs & check_log.

*First check_procs:
Forget nagios config, I just run check_procs on command line like this :
./check_procs -w 80 -c 95
System call sent warnings to stderr
CRITICAL - 143 processes running

So as you can see I received a warning message "System call sent 
warnings to stderr" and Nagios only intercept the warning and said this 
line in the web interface. I don't know where this message is coming 
from because when I do a 'ps aux' I received no more message except 
processus line ... any idea, I put a strace of the command below at the 
end of the mail.

*Then, check_log:
Here, I don't understand the usage on the command line, I tried :
#./check_log -F /var/log/messages -O /tmp/bidon -q error
Log check data initialized...

It copies my var/log/message in the the file /tmp/bidon
and if I retry my command or if I modify it I always received that:
#./check_log -F /var/log/messages -O /tmp/bidon -q error
./check_log: line 200: unexpected EOF while looking for matching ``'
./check_log: line 215: syntax error: unexpected end of file

So to do simple: how does this plugin works ? (the -h is not so useful)

Hope a good samaritan could help me ;)
Thx & A+

---strace of check-procs ---
execve("./check_procs", ["./check_procs", "80", "95"], [/* 15 vars */]) = 0
uname({sys="Linux", node="Goodspeed", ...}) = 0
brk(0)                                  = 0x804c720
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0x40015000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or 
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=24592, ...}) = 0
old_mmap(NULL, 24592, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\230\327"..., 
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1170812, ...}) = 0
old_mmap(NULL, 1187616, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001d000
mprotect(0x40135000, 40736, PROT_NONE)  = 0
old_mmap(0x40135000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 
3, 0x117000) = 0x40135000
old_mmap(0x4013b000, 16160, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4013b000
close(3)                                = 0
munmap(0x40016000, 24592)               = 0
brk(0)                                  = 0x804c720
brk(0x804cb38)                          = 0x804cb38
brk(0x804d000)                          = 0x804d000
getrlimit(0x4, 0xbffff2f4)              = 0
setrlimit(RLIMIT_CORE, {rlim_cur=0, rlim_max=RLIM_INFINITY}) = 0
getrlimit(0x7, 0xbffff254)              = 0
brk(0x8050000)                          = 0x8050000
brk(0x8053000)                          = 0x8053000
pipe([3, 4])                            = 0
pipe([5, 6])                            = 0
fork()                                  = 25506
close(4)                                = 0
fcntl64(3, F_GETFL)                     = 0 (flags O_RDONLY)
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0x40016000
_llseek(3, 0, 0xbffff114, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
close(6)                                = 0
fcntl64(5, F_GETFL)                     = 0 (flags O_RDONLY)
fstat64(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0x40017000
_llseek(5, 0, 0xbffff184, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
read(3, "STAT   UID  PPID COMMAND        "..., 4096) = 4096
read(3, " 2371 bash             bash\nS   "..., 4096) = 4096
read(3, "eck_procs 80 95\nR        0 25505"..., 4096) = 87
read(3, 0x40016000, 4096)               = ? ERESTARTSYS (To be restarted)
--- SIGCHLD (Child exited) ---
read(3, "", 4096)                       = 0
read(5, "Bad syntax, perhaps a bogus \'-\'?"..., 4096) = 33
read(5, "", 4096)                       = 0
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 5), ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0x40018000
write(1, "System call sent warnings to std"..., 36System call sent 
warnings to stderr
) = 36
close(5)                                = 0
munmap(0x40017000, 4096)                = 0
close(3)                                = 0
munmap(0x40016000, 4096)                = 0
wait4(25506, [WIFEXITED(s) && WEXITSTATUS(s) == 0], 0, NULL) = 25506
write(1, "CRITICAL - 144 processes running"..., 33CRITICAL - 144 
processes running
) = 33
munmap(0x40018000, 4096)                = 0
_exit(2)                                = ?

-----end------



-------------------------------------------------------
This sf.net email is sponsored by: Jabber - The world's fastest growing 
real-time communications platform! Don't just IM. Build it in! 
http://www.jabber.com/osdn/xim




More information about the Users mailing list