pingmon 0.2 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/bin/pingmon +14 -14
  3. data/config/pingmon.yml +4 -4
  4. metadata +3 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2
1
+ 0.2.1
@@ -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
- ARGV.shift
16
- end
17
-
18
- begin
19
- PingMon.log = ENV['PINGMON_LOG'] || 'stdout'
20
- PingMon.execute_from_config(ARGV.first || PingMon::DEFAULT_CONFIG_FILE)
21
- rescue PingMon::ConfigFileNotFound => e
22
- puts "WTF! #{e.message}"
23
- puts "If this is your first time using pingmon you should run \`pingmon build-config\`." if ARGV.size == 0
24
- rescue StandardError => e
25
- puts "WTF! #{e.message}"
26
- rescue SystemExit, Interrupt
27
- puts "See ya!"
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
 
@@ -1,17 +1,17 @@
1
1
  # pingmon config options
2
2
  config:
3
3
  # host to be monitored
4
- host: 192.168.0.7
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: 2m
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: estanis.trepat@inson.es
12
+ notify_to: myownemailaddress@email.com
13
13
  # from address
14
- from_address: estanis.trepat@inson.es
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: 15
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- version: "0.2"
9
+ - 1
10
+ version: 0.2.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Estanislau Trepat