naginata 0.1.3 → 0.1.4
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +5 -7
- data/lib/naginata/cli.rb +6 -4
- data/lib/naginata/cli/hosts.rb +1 -1
- data/lib/naginata/cli/services.rb +1 -1
- data/lib/naginata/status.rb +1 -1
- data/lib/naginata/templates/Naginatafile +3 -0
- data/lib/naginata/version.rb +1 -1
- data/lib/nagios_analyzer/section_decorator.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5153f8a4699719891f2a79d83eb4b66c1cca2a1
|
4
|
+
data.tar.gz: 8ceceddd2a134409b7fed9a382311342dd6ca783
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c5a5b08495929ea05708b73bb00036114f30b7264788f9b10ce2266822ec9385e867c70e7f8e83703a848e5565c7538b3dc6cfb3a533fa936c8417f58b99020
|
7
|
+
data.tar.gz: 3863bc85efbb2bafc139427b8b323e3230e81b1aeddea2beed36d27172f93bc41d6aa593e0406d4987116c779ec071429f7110b3f7745b5612366a5bbc3f96e1
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -5,7 +5,7 @@ Naginata is multi nagios server control tool. If you have multiple nagios server
|
|
5
5
|
Naginata includes `naginata` command executable. `naginata` command can be done by just single command execution from workstation host.
|
6
6
|
|
7
7
|
* Enable/Disable notifications of hosts and services.
|
8
|
-
* Display current host and service status.
|
8
|
+
* Display current host and service status.
|
9
9
|
* and more
|
10
10
|
|
11
11
|
If you already have nagios servers, it's easy to try out Naginata! It does not require to install ruby and Naginata on remote nagio servers.
|
@@ -111,7 +111,7 @@ Output example:
|
|
111
111
|
```
|
112
112
|
$ naginata services -a
|
113
113
|
NAGIOS HOST SERVICE STATUS FLAGS OUTPUT
|
114
|
-
nagios0 localhost HTTP WARNING AC,nt HTTP WARNING: HTTP/1.1 403 Forbidden - 5152 bytes
|
114
|
+
nagios0 localhost HTTP WARNING AC,nt HTTP WARNING: HTTP/1.1 403 Forbidden - 5152 bytes ...
|
115
115
|
nagios0 localhost Current Load OK AC,NT OK - load average: 0.00, 0.00, 0.00
|
116
116
|
nagios0 localhost PING OK AC,NT PING OK - Packet loss = 0%, RTA = 0.04 ms
|
117
117
|
nagios0 redis01.tokyo.local Load CRITICAL AC,NT Too high load average 15
|
@@ -167,9 +167,9 @@ $ naginata hosts web01.example.com db01.example.com
|
|
167
167
|
```
|
168
168
|
|
169
169
|
|
170
|
-
###
|
170
|
+
### Nagios server filter
|
171
171
|
|
172
|
-
You can
|
172
|
+
You can filter targeted nagios servers with `--nagios=nagiosserver1,..` (or `-N=` shortly) option.
|
173
173
|
|
174
174
|
For example:
|
175
175
|
|
@@ -189,9 +189,7 @@ naginata command with `--debug`
|
|
189
189
|
|
190
190
|
## Development
|
191
191
|
|
192
|
-
After checking out the repo, run `
|
193
|
-
|
194
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
192
|
+
After checking out the repo, run `bundle install` to install dependencies. Then, run `bundle exec rake console` for an interactive prompt that will allow you to experiment.
|
195
193
|
|
196
194
|
## Contributing
|
197
195
|
|
data/lib/naginata/cli.rb
CHANGED
@@ -22,7 +22,7 @@ module Naginata
|
|
22
22
|
method_option :disable, aliases: "-d", desc: "Disable notification", type: :boolean
|
23
23
|
method_option :dry_run, aliases: "-n", type: :boolean
|
24
24
|
method_option :force, aliases: "-f", desc: "Run without prompting for confirmation", type: :boolean
|
25
|
-
method_option :nagios, desc: "Filter
|
25
|
+
method_option :nagios, aliases: "-N", desc: "Filter targeted nagios servers by their hostname", type: :array
|
26
26
|
method_option :services, aliases: "-s", desc: "Services to be enabled|disabled", type: :array
|
27
27
|
method_option :all_hosts, aliases: "-a", desc: "Target all hosts", type: :boolean
|
28
28
|
def notification(*patterns)
|
@@ -34,7 +34,7 @@ module Naginata
|
|
34
34
|
CLI::Notification.new(options.merge(patterns: patterns)).execute
|
35
35
|
end
|
36
36
|
|
37
|
-
method_option :nagios, desc: "Filter
|
37
|
+
method_option :nagios, aliases: "-N", desc: "Filter targeted nagios servers by their hostname", type: :array
|
38
38
|
desc 'fetch', 'Download remote status.dat and create cache on local'
|
39
39
|
def fetch
|
40
40
|
require 'naginata/cli/fetch'
|
@@ -42,8 +42,9 @@ module Naginata
|
|
42
42
|
end
|
43
43
|
|
44
44
|
desc 'hosts [hostpattern ..]', 'View host status'
|
45
|
-
method_option :nagios, desc: "Filter
|
45
|
+
method_option :nagios, aliases: "-N", desc: "Filter targeted nagios servers by their hostname", type: :array
|
46
46
|
method_option :all_hosts, aliases: "-a", desc: "Target all hosts", type: :boolean
|
47
|
+
method_option :wide, aliases: "-w", desc: "Wide output", type: :boolean
|
47
48
|
def hosts(*patterns)
|
48
49
|
if patterns.empty? and !options[:all_hosts]
|
49
50
|
help(:hosts)
|
@@ -54,9 +55,10 @@ module Naginata
|
|
54
55
|
end
|
55
56
|
|
56
57
|
desc 'services [hostpattern ..]', 'View service status'
|
57
|
-
method_option :nagios, desc: "Filter
|
58
|
+
method_option :nagios, aliases: "-N", desc: "Filter targeted nagios servers by their hostname", type: :array
|
58
59
|
method_option :services, aliases: "-s", desc: "Filter by service description", type: :array
|
59
60
|
method_option :all_hosts, aliases: "-a", desc: "Target all hosts", type: :boolean
|
61
|
+
method_option :wide, aliases: "-w", desc: "Wide output", type: :boolean
|
60
62
|
def services(*patterns)
|
61
63
|
if patterns.empty? and !options[:all_hosts]
|
62
64
|
help(:services)
|
data/lib/naginata/cli/hosts.rb
CHANGED
data/lib/naginata/status.rb
CHANGED
data/lib/naginata/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: naginata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nobuhiro Nikushi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sshkit
|