[op5-users] Passive checks with op5 Monitor

Mattias Ryrlén mattias.ryrlen at op5.com
Thu Dec 11 10:53:43 CET 2008


Hi, this is a english list :)

I have another funny solution for distributed sync.

Using syslog to send data to Master server. this doesn't include sync of
config but you get the passive data.

Then you have to have some checks of freshness and stuff like that to.


******** Scripts ********
- sync_udp_parser.sh (can be obtained, reading from the pipe and copy to
nagios pipe, prob need to redo this script since i have seen it die on
my installation some times, prob a simple loop will do it.)
- sync_udp_send.sh (can be obtained, more or less using logger with
preformatted nagios PASSIVE HOST/SERVICE format)

******** ServerA (Poller) ********
The server doing the actual polling.

******** Config ********
* Place sync_udp_send.sh to passive directory
/opt/monitor/op5/passive/

** nagios.cfg
  - obsess_over_services=1
  - obsess_over_hosts=1
  - ocsp_command=sync_send_udp_service
  - ochp_command=sync_send_udp_host
(you may also need to verify that you have obsess_over_[services/hosts]
enabled in your specific templates)

** misccommands.cfg
# command 'sync_send_udp_host'
define command{
    command_name                   sync_send_udp_host

command_line                   /opt/monitor/op5/passive/sync_udp_send.sh
host $TIMET$ $HOSTNAME$ $HOSTSTATE$ '$HOSTOUTPUT$'
    }

# command 'sync_send_udp_service'
define command{
    command_name                   sync_send_udp_service

command_line                   /opt/monitor/op5/passive/sync_udp_send.sh
service $TIMET$ $HOSTNAME$ $SERVICESTATE$ '$SERVICEOUTPUT$'
'$SERVICEDESC$'
    }

* syslogd
edit /etc/syslog.conf
local6.*                    @<ip of ServerB>

service monitor configtest

if everything went ok.
service monitor reload







******** ServerB (Master) ********
The server that recive the passive result

******** Config ********
* Create pipe for passive syslog udp messages.
mknod /opt/monitor/op5/passive/sync_udp.pipe p
chmod 600 /opt/monitor/op5/passive/sync_udp.pipe 

* Place pipe parser (sync_udp_parser.sh) to passive directory
/opt/monitor/op5/passive/

* Start parser
/opt/monitor/op5/passive/sync_udp_parser.sh
< /opt/monitor/op5/passive/sync_udp.pipe &

* syslogd
edit /etc/syslog.conf
local6.*                        |/opt/monitor/op5/passive/sync_udp.pipe



On Thu, 2008-12-11 at 10:32 +0100, Mikael.Schmidt at ixx.se wrote:
> Hej,
> 
> Intressant sett att göra det på... jag har ett backupscript som jag gjort själv, för att kontrollera att backupen har gått har jag sedan en check i monitor som kontrollerar varje morgon 0800 om den har körts eftersom den bara körs en gång per dygn men detta kanske jag se om jag inte ska implementera istället :) ser fram emot att se implementationen med mysqlbackupen
> 
> -----Ursprungligt meddelande-----
> Från: op5-users-bounces at lists.op5.com [mailto:op5-users-bounces at lists.op5.com] För Peter Andersson
> Skickat: den 10 december 2008 20:02
> Till: Mailinglist for op5's products
> Ämne: [op5-users] Passive checks with op5 Monitor
> 
> Hi op5 users,
> 
> I had some problem monitoring a backup script that runs every night and 
> find out that passive checks are an elegant way of solving the 
> monitoring of my backup script. I read the manuals at Nagios.org and it 
> took a while to understand how it worked. Because it took a while for 
> me, it probably will for others as well.
> So I created a short howto to get started with passive checks.
> Read it at:
> http://www.it-slav.net/blogs/?p=392#more-392
> If you have any questions do not hesitate to contact me or comment my blog.
> 
> Best regards
> Peter Andersson
> _______________________________________________
> op5-users mailing list
> op5-users at lists.op5.com
> http://lists.op5.com/mailman/listinfo/op5-users
> 
> _______________________________________________
> op5-users mailing list
> op5-users at lists.op5.com
> http://lists.op5.com/mailman/listinfo/op5-users
-- 
Vänliga hälsningar / Best Regards
Mattias Ryrlén

__________________________
op5 AB
Första Långgatan 19
SE-413 27 Göteborg
Mobil: +46 735-17 70 99
Support: +46 31-774 09 24
www.op5.com



More information about the op5-users mailing list