forked from bonomani/devmon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevmon
executable file
·52 lines (43 loc) · 1.24 KB
/
devmon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/perl -w
our $VERSION = '0.3.1-beta1';
# Devmon: An SNMP data collecteor & page generator for the
# Xymon network monitoring systems
# Copyright (C) 2005-2006 Eric Schwimmer
#
# $URL: svn://svn.code.sf.net/p/devmon/code/trunk/devmon $
# $Revision
# $Id: devmon 123 2009-01-23 15:36:41Z buchanmilne $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. Please see the file named
# 'COPYING' that was included with the distrubition for more details.
# Global Modules
use strict;
# Devmon specific modules
use FindBin;
use lib "$FindBin::Bin/modules";
use dm_config;
use dm_templates;
use dm_snmp;
use dm_tests;
use dm_msg;
# Do start-up housekeeping
initialize($VERSION);
# Enter main loop
do_log("Entering poll loop", 0);
while (1) {
# Read in template data
read_templates();
# Load/reload test data & do failover recover
sync_servers();
# Now collect SNMP data
poll_devices();
# Now do tests
tests();
# Now send messages
send_msgs();
# Do time tests and then sleep
time_test();
}