How can monitor special service on linux with nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

How can monitor special service on linux with nagios

Post by baber »

HI

i have a question about monitor a service on Linux for example

i have a service with name Tuxedo and it is run in linux and my nagios core is also run on linux now i want to know if i want monirot this service with name of Tuxedo
where do i have to (in which file with what configs) this service ?

best regards
Babak
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How can monitor special service on linux with nagios

Post by rkennedy »

Is the Tuxedo service running on the local machine, or another machine? What is the result of ps -ef|grep tuxedo|wc -l on the machine running Tuxedo?
Former Nagios Employee
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

Re: How can monitor special service on linux with nagios

Post by baber »

no i have a seprate server with linux os that installed on tuxedo service and i want monitor this server from nagios

i have more that 10 server that installed on them tuxedo service but on one of them that tuxedo was run when i use this command (ps -ef|grep tuxedo|wc -l)

the out put is 97 and when tuxedo is down it return 12

but on the other server when tuxedo is up it return 53 and when tuxedo is down it return 6
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How can monitor special service on linux with nagios

Post by rkennedy »

We might need to modify the grep command to be more specific, what is the complete output of ps -ef|grep tuxedo?
Former Nagios Employee
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

Re: How can monitor special service on linux with nagios

Post by baber »

when my tuxedo service is down on server 1 :

Code: Select all

[tuxedo:/home/tuxedo/LIVE >ps -ef|grep tuxedo
root     17160 23463  0 Feb01 ?        00:00:00 sshd: tuxedo [priv]
tuxedo   17773 17160  0 Feb01 ?        00:00:05 sshd: tuxedo@pts/1
tuxedo   17774 17773  0 Feb01 pts/1    00:00:00 -bash
root     13726 23463  0 Feb02 ?        00:00:00 sshd: tuxedo [priv]
tuxedo   13728 13726  0 Feb02 ?        00:00:04 sshd: tuxedo@pts/3
tuxedo   13729 13728  0 Feb02 pts/3    00:00:00 -bash
root      6914 23463  0 20:35 ?        00:00:00 sshd: tuxedo [priv]
tuxedo    6916  6914  0 20:35 ?        00:00:00 sshd: tuxedo@pts/0
tuxedo    6917  6916  0 20:35 pts/0    00:00:00 -bash
tuxedo   19179  6917  0 21:27 pts/0    00:00:00 ps -ef
tuxedo   19184  6917  0 21:27 pts/0    00:00:00 grep tuxedo

when my tuxedo service is up on server 1 :

Code: Select all

root     17160 23463  0 Feb01 ?        00:00:00 sshd: tuxedo [priv]
tuxedo   17773 17160  0 Feb01 ?        00:00:05 sshd: tuxedo@pts/1
tuxedo   17774 17773  0 Feb01 pts/1    00:00:00 -bash
root     13726 23463  0 Feb02 ?        00:00:00 sshd: tuxedo [priv]
tuxedo   13728 13726  0 Feb02 ?        00:00:04 sshd: tuxedo@pts/3
tuxedo   13729 13728  0 Feb02 pts/3    00:00:00 -bash
root      6914 23463  0 20:35 ?        00:00:00 sshd: tuxedo [priv]
tuxedo    6916  6914  0 20:35 ?        00:00:00 sshd: tuxedo@pts/0
tuxedo    6917  6916  0 20:35 pts/0    00:00:00 -bash
tuxedo   20318     1  0 21:31 pts/0    00:00:00 BBL -g 30002 -i 0 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A
tuxedo   20320     1  0 21:31 pts/0    00:00:00 TMUSREVT -g 7 -i 9301 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A --
tuxedo   20321     1  0 21:31 pts/0    00:00:00 JSL -g 8 -i 9311 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -- -c 2048 -n //10.0.0.94:49500 -m30 -M35 -x35
tuxedo   20322 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 0 -s 28311555
tuxedo   20323 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 1 -s 28311555
tuxedo   20324 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 2 -s 28311555
tuxedo   20325 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 3 -s 28311555
tuxedo   20326 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 4 -s 28311555
tuxedo   20327 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 5 -s 28311555
tuxedo   20328 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 6 -s 28311555
tuxedo   20329 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 7 -s 28311555
tuxedo   20330 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 8 -s 28311555
tuxedo   20331 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 9 -s 28311555
tuxedo   20332 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 10 -s 28311555
tuxedo   20333 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 11 -s 28311555
tuxedo   20334 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 12 -s 28311555
tuxedo   20335 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 13 -s 28311555
tuxedo   20336 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 14 -s 28311555
tuxedo   20337 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 15 -s 28311555
tuxedo   20338 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 16 -s 28311555
tuxedo   20339 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 17 -s 28311555
tuxedo   20340 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 18 -s 28311555
tuxedo   20341 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 19 -s 28311555
tuxedo   20342 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 20 -s 28311555
tuxedo   20343 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 21 -s 28311555
tuxedo   20344 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 22 -s 28311555
tuxedo   20345 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 23 -s 28311555
tuxedo   20346 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 24 -s 28311555
tuxedo   20347 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 25 -s 28311555
tuxedo   20348 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 26 -s 28311555
tuxedo   20349 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 27 -s 28311555
tuxedo   20350 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 28 -s 28311555
tuxedo   20351 20321  0 21:31 pts/0    00:00:00 JSH -c 36 -i 29 -s 28311555
tuxedo   20352     1  0 21:31 pts/0    00:00:00 JREPSVR -g 11 -i 9411 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -- -W -P/home/tuxedo/LIVE/jrepository
tuxedo   20353     1  0 21:31 pts/0    00:00:00 ORATMS -g 1 -i 30001 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A
tuxedo   20405     1  0 21:31 pts/0    00:00:00 ORATMS -g 1 -i 30002 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A
tuxedo   20406     1  0 21:31 pts/0    00:00:00 ORATMS -g 1 -i 30003 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A
tuxedo   20407     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1000 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20408     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1001 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20409     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1002 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20410     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1003 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20411     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1004 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20412     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1005 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20413     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1006 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20414     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1007 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20415     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1008 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20416     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1009 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20417     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1010 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20418     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1011 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20419     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1012 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20420     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1013 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20421     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1014 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20422     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1015 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20423     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1016 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20424     1  0 21:31 pts/0    00:00:00 TxCallProc -g 1 -i 1017 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxCall:TxCallProc -- -U
tuxedo   20425     1  0 21:31 pts/0    00:00:00 TxGetHostData -g 1 -i 1051 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxGet:TxGetHostData -- -U
tuxedo   20426     1  0 21:31 pts/0    00:00:00 TxGetHostData -g 1 -i 1052 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxGet:TxGetHostData -- -U
tuxedo   20427     1  0 21:31 pts/0    00:00:00 TxGetHostData -g 1 -i 1053 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxGet:TxGetHostData -- -U
tuxedo   20428     1  0 21:31 pts/0    00:00:00 TxGetHostData -g 1 -i 1054 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxGet:TxGetHostData -- -U
tuxedo   20430     1  0 21:31 pts/0    00:00:00 TxGetHostData -g 1 -i 1055 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxGet:TxGetHostData -- -U
tuxedo   20431     1  0 21:31 pts/0    00:00:00 TxGetHostData -g 1 -i 1056 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxGet:TxGetHostData -- -U
tuxedo   20432     1  0 21:31 pts/0    00:00:00 TxSignature -g 1 -i 1101 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxSign:TxSignature -- -U
tuxedo   20433     1  0 21:31 pts/0    00:00:00 TxSignature -g 1 -i 1102 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxSign:TxSignature -- -U
tuxedo   20434     1  0 21:31 pts/0    00:00:00 TxSignature -g 1 -i 1103 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -s live01_TxSign:TxSignature -- -U
tuxedo   20435     1  0 21:31 pts/0    00:00:00 TxCleanup -g 1 -i 1221 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxClean:TxCleanup
tuxedo   20436     1  0 21:31 pts/0    00:00:00 TxCleanup -g 1 -i 1222 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxClean:TxCleanup
tuxedo   20437     1  0 21:31 pts/0    00:00:00 TxCleanup -g 1 -i 1223 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxClean:TxCleanup
tuxedo   20438     1  0 21:31 pts/0    00:00:00 TxCleanup -g 1 -i 1224 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxClean:TxCleanup
tuxedo   20439     1  0 21:31 pts/0    00:00:00 TxCleanup -g 1 -i 1225 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxClean:TxCleanup
tuxedo   20440     1  0 21:31 pts/0    00:00:00 TxCleanup -g 1 -i 1226 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxClean:TxCleanup
tuxedo   20441     1  0 21:31 pts/0    00:00:00 TxCleanup -g 1 -i 1227 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxClean:TxCleanup
tuxedo   20442     1  0 21:31 pts/0    00:00:00 TxCleanup -g 1 -i 1228 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxClean:TxCleanup
tuxedo   20443     1  0 21:31 pts/0    00:00:00 TxCleanup -g 1 -i 1229 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxClean:TxCleanup
tuxedo   20444     1  0 21:31 pts/0    00:00:00 TxLOB -g 1 -i 1271 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxLOB:TxLOB -- -U
tuxedo   20445     1  0 21:31 pts/0    00:00:00 TxLOB -g 1 -i 1272 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxLOB:TxLOB -- -U
tuxedo   20446     1  0 21:31 pts/0    00:00:00 TxLOB -g 1 -i 1273 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxLOB:TxLOB -- -U
tuxedo   20447     1  0 21:31 pts/0    00:00:00 TxLOB -g 1 -i 1274 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxLOB:TxLOB -- -U
tuxedo   20450     1  0 21:31 pts/0    00:00:00 TxLOB -g 1 -i 1275 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxLOB:TxLOB -- -U
tuxedo   20461     1  0 21:31 pts/0    00:00:00 TxLOB -g 1 -i 1276 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxLOB:TxLOB -- -U
tuxedo   20462     1  0 21:31 pts/0    00:00:00 TxLOB -g 1 -i 1277 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxLOB:TxLOB -- -U
tuxedo   20463     1  0 21:31 pts/0    00:00:00 TxLOB -g 1 -i 1278 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxLOB:TxLOB -- -U
tuxedo   20464     1  0 21:31 pts/0    00:00:00 TxLOB -g 1 -i 1279 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxLOB:TxLOB -- -U
tuxedo   20465     1  0 21:31 pts/0    00:00:00 TxLOB -g 1 -i 1280 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxLOB:TxLOB -- -U
tuxedo   20466     1  0 21:31 pts/0    00:00:00 TxLOB -g 1 -i 1281 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxLOB:TxLOB -- -U
tuxedo   20467     1  0 21:31 pts/0    00:00:00 TxLOB -g 1 -i 1282 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A -r -s live01_TxLOB:TxLOB -- -U
tuxedo   20959  6917  0 21:32 pts/0    00:00:00 ps -ef
tuxedo   20964  6917  0 21:32 pts/0    00:00:00 grep tuxedo

rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How can monitor special service on linux with nagios

Post by rkennedy »

You should be able to create a script that greps based on one of these processes, and if the count is 0 then tuxedo is not running -

Code: Select all

tuxedo   20318     1  0 21:31 pts/0    00:00:00 BBL -g 30002 -i 0 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A
tuxedo   20320     1  0 21:31 pts/0    00:00:00 TMUSREVT -g 7 -i 9301 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -A --
tuxedo   20321     1  0 21:31 pts/0    00:00:00 JSL -g 8 -i 9311 -u tux_server.test.com -U /home/tuxedo/LIVE/ULOG -m 0 -- -c 2048 -n //10.0.0.94:49500 -m30 -M35 -x35
A write up for creating plugins can be found here - http://www.yourownlinux.com/2014/06/how ... cript.html
Former Nagios Employee
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

Re: How can monitor special service on linux with nagios

Post by baber »

excuseme

can you help me for an script that monitor my tuxedo service?

because i am not strong for script

so thanks

Best regards
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How can monitor special service on linux with nagios

Post by rkennedy »

If you'd like a custom plugin written feel free to contact [email protected] for a quote - as for writing plugins for you this is beyond the support we provide.

Alternatively, contact someone who writes bash scripts on your team and see if they can write something up. We can help if they run into issues.
Former Nagios Employee
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

Re: How can monitor special service on linux with nagios

Post by baber »

tuxedo is an oracle service do you think there is a plugin for monitor that ?


i have find this :

https://exchange.nagios.org/directory/A ... rd/details

or this plugin

https://exchange.nagios.org/directory/P ... 22/details

do you think it can be help me for monitor oracle tuxedo?

Best regards
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How can monitor special service on linux with nagios

Post by rkennedy »

I don't think the first link will work for you as it's monitoring ASM,LISTENER,GSD,ONS,VIP. From the looks of it, I don't believe this ties into Tuxedo. I may be wrong though.

The second link is for a wizard, which won't work for you.

Does Tuxedo open TCP/UDP ports that you could monitor?
Former Nagios Employee
Locked