pingmon 0.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/pingmon +14 -14
- data/config/pingmon.yml +4 -4
- metadata +3 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2
|
1
|
+
0.2.1
|
data/bin/pingmon
CHANGED
@@ -11,19 +11,19 @@ end
|
|
11
11
|
usage("wrong number of args") if ARGV.size != 0 && ARGV.size != 1
|
12
12
|
|
13
13
|
if ARGV.size == 1 && ARGV.first.strip == 'build-config'
|
14
|
-
PingMon::Config.build_config
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
PingMon
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
14
|
+
f = PingMon::Config.build_config
|
15
|
+
puts "Please, edit #{f} and run 'pingmon' again."
|
16
|
+
else
|
17
|
+
begin
|
18
|
+
PingMon.log = ENV['PINGMON_LOG'] || 'stdout'
|
19
|
+
PingMon.execute_from_config(ARGV.first || PingMon::DEFAULT_CONFIG_FILE)
|
20
|
+
rescue PingMon::ConfigFileNotFound => e
|
21
|
+
puts "WTF! #{e.message}"
|
22
|
+
puts "If this is your first time using pingmon you should run \`pingmon build-config\`." if ARGV.size == 0
|
23
|
+
rescue StandardError => e
|
24
|
+
puts "WTF! #{e.message}"
|
25
|
+
rescue SystemExit, Interrupt
|
26
|
+
puts "See ya!"
|
27
|
+
end
|
28
28
|
end
|
29
29
|
|
data/config/pingmon.yml
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
# pingmon config options
|
2
2
|
config:
|
3
3
|
# host to be monitored
|
4
|
-
host: 192.168.
|
4
|
+
host: 192.168.1.1
|
5
5
|
# mode (ping/monitor)
|
6
6
|
mode: monitor
|
7
7
|
# monitor (ping) host every 2 minutes (if set to monitor mode)
|
8
|
-
monitor_interval:
|
8
|
+
monitor_interval: 15m
|
9
9
|
# wether it should send 'down' notifications by email
|
10
10
|
notify_when_down: true
|
11
11
|
# whom to notify (if more than one, comma separated)
|
12
|
-
notify_to:
|
12
|
+
notify_to: myownemailaddress@email.com
|
13
13
|
# from address
|
14
|
-
from_address:
|
14
|
+
from_address: bofh@serveradmin.com
|
15
15
|
# :sendmail or :smtp (options below). :sendmail may only work on unix/linux
|
16
16
|
transport: :sendmail
|
17
17
|
# smtp_options ( if transport is set to :smtp. They are passed *as is* to `Pony.mail` method )
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pingmon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Estanislau Trepat
|