[Nagios-users] problems with a Script on nagios
Hi Nagiosexchange users!!! I have some problems with this bash script. The objetive is to monitor all the incorrect logins to the sistem so I created this script. check_acces --- #!/bin/bash di=`date '+%B %d'` for i in `cut -f1 -d: /etc/passwd`; do kkY=`grep \Failed\ \keyboard-interactive/pam\ \for\ \$i /var/log/messages |cut -c1-15|awk /$di/` if [ $kkY != ] then sa1=$sa1 User: $i Date of Attempts:$kkY fi done kk6=`grep \Failed\ \keyboard-interactive/pam\ \for\ \illegal\ \user /var/log/messages |cut -c1-15 |awk /$di/` sal2=EXISTING USERS:$sa1 NO EXISTING USERS: Date of Attempts:$kk6 sal3=`echo $sal2` echo $sal3 The script works fine on shell, I execute the script like this ./check_acces and it returns this EXISTING USERS: User: root Date of Attempts:May 31 08:40:03 May 31 08:40:04 May 31 08:40:15 May 31 08:40:17 May 31 08:40:18 User: jon Date of Attempts:May 31 08:40:33 May 31 08:40:34 May 31 08:40:35 May 31 08:40:36 May 31 08:40:38 NO EXISTING USERS: Date of Attempts:May 31 08:40:54 May 31 08:40:56 May 31 08:40:57 May 31 08:40:59 May 31 08:41:01 May 31 08:41:02 May 31 08:41:04 May 31 08:41:14 May 31 08:41:15 May 31 08:41:16 May 31 08:41:17 May 31 08:41:19 May 31 08:41:20 May 31 08:41:23 this is ok, it works fine. But when I declare a service and a command on Nagios with this script something extrange happends, only appears this on Nagios, where are the incorect logins? They doesn´t appear. Service Status Last Check Duration AttemptStatus information Incorrect Access OK 05-31-2007 09:30:46 2d 23h 30m 55s 1/4 EXISTING USERS: NO EXISTING USERS: Date of Attempts: I dont know why when the script is executed by nagios it doesn´t return anything and it works fine on shell. The script executed by nagios it doesn´t return the same as when you executed on shell. Someone knows something about this? Thank you for help!!! Aritz.- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] problems with a Script on nagios
Hola Jose Luis, Primero gracias por responderme, te lo agradezco. La cuestion es que le he dado los permisos al usuario nagios y todo sigue igual si se te ocurre algo mas nuevamente gracias por la ayuda! Aritz. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] Nagios SNMP traps
Hi friends of Nagios! I´m trying to monitor a service that works with snmp traps. The problem is that i recive the trap in my server, but nagios doesn´t do anything. The service status is pending, also when the trap arrives into our server the status of the service that works with traps continues pending. For making this work we follow a manual, we configured snmptrapd , we installed snmptrap translator and the simple event correlator (sec). Then we defined a service on Nagios to handle the traps on it. After that we introduced mib definition. The manual that we followed is this: http://www.samag.com/documents/s=9559/sam0503g/ Which migth be the problem? Any suggestion for monitor the traps? P.D. This problem happened on Nagios 2.7 and on recently upgraded Nagios 3.0a3- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] 2- Nagios SNMP traps
thanks for answering so fast, my server is a suse linux server. The other server that I've to monitor is an hp that sends previously configured traps. That traps arrived into the server, but nagios does nothing with them. Any other suggest Thank u!! Aritz - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] upgrade Nagios
Hi! I´m working with my nagios 2.7 and i´ve to upgrade to version 3. What i´ve to do to preserve my services? Is it enougth if i copy urs folder in the new version of Nagios? Someone has done this? thank you.- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] Snmptrap with Nagios
Hello. I have to monitor a thing that works with snmptraps, but I don`t know what I have to do. I have read something about check_dummyHow is it works? And then what i have to do, Create a service with passice_ check activate, and using the check_dummy command? Thanks, - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] how to monitor my SAN
Hi I´ve to monitor the used space of disks of mi SAN(eva6000(HP)) that is connected to a server X. The SAN doesn´t have IP. Mi local machine where is nagios runnig Y can comunicate whith the server of SAN X. I can use snmp, but only i can reach X server from my Y machine, and not the SAN. But i don´t know how can i get the used space of my SAN. ´ Could you help me? any information would be really helpful for me. PD.Sorry because my english is not so good. Thank you. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null