op5util 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66a61ce3bc99e6e4d91278aefc1c6d3f5f9c4fd2
4
- data.tar.gz: ba3e0fd30da81840f892b86f3244337a1c74ae6b
3
+ metadata.gz: e98f6586637c365b530e61bfbe8f093810f91c4a
4
+ data.tar.gz: af78260122910360c4b002a63517e741cdd5dfb1
5
5
  SHA512:
6
- metadata.gz: 971e2e9b7b31ec5df7b079ed2da7b67c0783d7b21cf916b6d42df074f3d4a0bb08d2f7990b9373745a4543f251424e42fe82c020dbe3ccad374509142649b7cc
7
- data.tar.gz: 27bd5cf0ba4dd63fac584f02c4e92c16b91a2465a14cc77a29ae64d73297a0d185510d4e02f78b7120b32c0af509421432cfffc994438462a24159163f15ea1b
6
+ metadata.gz: 299a69cdfc4641c84eacbe55fda165b818e3d89fe164b07542c10d8767c9e52cbc7098a50fabd208e4872d56a492a740f29d3b5e6c00d345593b7b22eb5f9f01
7
+ data.tar.gz: ec5d9537d086bf34e302e063000806cb138a26919ea91b587ae502cf71a3c152163f80c9a203983bb67e7156129179f3a1398db8eeeaf6b84f16174454577f48
data/Readme.md CHANGED
@@ -77,31 +77,36 @@ Once the problem is resolved and the host is up, ```op5util schedule gitlab01, b
77
77
 
78
78
  ## Installation
79
79
 
80
- Use gem install, probably with sudo if you are using a system-global ruby version. This will automatically
81
- install op5util with dependencies.
80
+ Install instructions intended for and tested on a fresh install of ubuntu 16.04.
81
+
82
+ Op5util is distributed as a ruby gem, so first ruby must be installed.
83
+
84
+ ``` shell
85
+ user@host:~$ sudo apt-get install -y ruby
86
+ ```
87
+
88
+ Use the command gem install, sudo is needed. This will automatically install op5util
89
+ and the other gems that op5util depends on.
82
90
 
83
91
  ```shell
84
- $ sudo gem install op5util
85
- Fetching: colorize-0.8.1.gem (100%)
86
- Successfully installed colorize-0.8.1
87
- Fetching: gli-2.16.1.gem (100%)
88
- Successfully installed gli-2.16.1
89
- Fetching: multi_xml-0.6.0.gem (100%)
90
- Successfully installed multi_xml-0.6.0
91
- Fetching: httparty-0.15.5.gem (100%)
92
- When you HTTParty, you must party hard!
93
- Successfully installed httparty-0.15.5
94
- Fetching: unicode-display_width-1.3.0.gem (100%)
95
- Successfully installed unicode-display_width-1.3.0
96
- Fetching: terminal-table-1.8.0.gem (100%)
97
- Successfully installed terminal-table-1.8.0
98
- Fetching: op5util-0.1.2.gem (100%)
99
- Successfully installed op5util-0.1.2
100
- Done installing documentation for colorize, gli, multi_xml, httparty, unicode-display_width, terminal-table, op5util after 2 seconds
101
- 7 gems installed
92
+ user@host:~$ sudo gem install op5util
102
93
  ```
103
94
 
104
- Latest version is 0.1.2
95
+ Latest version is 0.1.3, you can verify that op5util is installed correctly with:
96
+
97
+ ``` shell
98
+ user@host:~$ gem list --details op5util
99
+
100
+ *** LOCAL GEMS ***
101
+
102
+ op5util (0.1.3)
103
+ Author: Niklas Paulsson
104
+ Homepage: https://github.com/np422/Op5util
105
+ License: MIT License
106
+ Installed at: /var/lib/gems/2.3.0
107
+
108
+ A utility to do common Op5 administration from the commandline
109
+ ```
105
110
 
106
111
  Rubygem homepage for op5util is available at: https://rubygems.org/gems/op5util
107
112
 
@@ -122,9 +127,9 @@ NAME
122
127
  About authentication, if you supply username/password as command-line flags they will be
123
128
  used first. If username/password options isn't supplied on the command-line, the environment
124
129
  variables OP5USER and OP5PASS will be used. If there are no environment variables present,
125
- the file ~/.op5pass (or --authfile=) will be read. The file format is a single line with
126
- username and password separated by a : (colon). The supplied credentials shoud be an
127
- account with administrative privileges.
130
+ the file ~/.op5pass (or --authfile=, or environment OP5AUTHFILE) will be read. The file
131
+ format is a single line with username and password separated by a : (colon). The supplied
132
+ credentials shoud be an account with administrative privileges.
128
133
 
129
134
  This application uses the REST-api described at https://your.op5.sever/api/help. Although
130
135
  TLS/SSL is used, no verification of the certificate is done as most Op5-servers have a
@@ -134,11 +139,12 @@ SYNOPSIS
134
139
  op5util [global options] command [command options] [arguments...]
135
140
 
136
141
  VERSION
137
- 0.0.9
142
+ 0.1.3
138
143
 
139
144
  GLOBAL OPTIONS
140
- -f, --authfile=authfile - Authfile containing "username:password" used to authenticate
141
- with Op5 server (default: ~/.op5pass)
145
+ -f, --authfile=authfile - Authfile containing "username:password" used to authenticate with Op5
146
+ server, enviromnent variable OP5AUTHFILE will override the default
147
+ value (default: ~/.op5pass)
142
148
  --help - Show this message
143
149
  -m, --monitor=monitor - Hostname or IP-address of the Op5 monitor server, if not supplied
144
150
  the environment variable MONITOR will be used (default: none)
@@ -149,16 +155,18 @@ GLOBAL OPTIONS
149
155
  --version - Display the program version
150
156
 
151
157
  COMMANDS
152
- acknowledge - Acknowledge outstanding host and service alarms.
158
+ acknowledge - Acknowledge outstanding host and service alarms, without host - *ALL*
159
+ outstanding alarms and services are acknowledged, ackn is "sticky" - it
160
+ lasts until host/service recovery.
153
161
  add - Add a new host to be monitored by the Op5 server
154
162
  add_hostgroups - Add host to a new hostgroup(s)
155
163
  downtime - Schedule fixed downtime for a host
156
164
  help - Shows a list of commands or help for one command
157
- hostgroups - List hostgroups, optionally with member and service info
165
+ hostgroups - List hostgroups, optionally with member and service info, Usage examples:
166
+ 'op5util hostgroups' to list all hostgroups, 'op5util hostgroups -l linux_hosts'
158
167
  to list members and services for the linux_hosts hostgroup
159
168
  schedule - Schedule host and all host services checks to be performed swiftly for the given host
160
169
  status - Show monitoring status, if no host is given all hosts/services are included
161
-
162
170
  ```
163
171
 
164
172
  ### Command usage
@@ -201,3 +209,10 @@ Please, give my repo a github star or drop me line if you find this utility usef
201
209
  free to leave a bug-reports or feature requests as an issue in this repo.
202
210
 
203
211
  /Niklas
212
+
213
+ ## Version history
214
+
215
+ ### 0.1.3
216
+
217
+ Environment variable OP5AUTHFILE possible to use instead of --authfile, check permission
218
+ of authfile and refuse to start if readable by other than owner.
@@ -1,3 +1,3 @@
1
1
  module Op5util
2
- VERSION = '0.1.3'.freeze
2
+ VERSION = '0.1.4'.freeze
3
3
  end
@@ -1,4 +1,4 @@
1
- # rubocop:disable UselessAssignment, StringLiterals
1
+ # rubocop:disable UselessAssignment
2
2
  require File.join([File.dirname(__FILE__), 'lib', 'op5util', 'version.rb'])
3
3
  spec = Gem::Specification.new do |s|
4
4
  s.name = 'op5util'
@@ -9,8 +9,8 @@ spec = Gem::Specification.new do |s|
9
9
  s.licenses = ['MIT License']
10
10
  s.homepage = 'https://github.com/np422/Op5util'
11
11
  s.summary = 'A utility to do common Op5 administration from the commandline'
12
- s.files = `git ls-files`.split("
13
- ")
12
+ s.files = %w[bin/op5util lib/op5util.rb LICENSE op5util.gemspec] +
13
+ %w[op5util.rdoc README.rdoc Readme.md] + Dir.glob('lib/op5util/*')
14
14
  s.require_paths << 'lib'
15
15
  s.has_rdoc = true
16
16
  s.extra_rdoc_files = ['README.rdoc', 'op5util.rdoc']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: op5util
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Niklas Paulsson
@@ -117,12 +117,8 @@ extra_rdoc_files:
117
117
  - README.rdoc
118
118
  - op5util.rdoc
119
119
  files:
120
- - ".gitignore"
121
- - Gemfile
122
- - Gemfile.lock
123
120
  - LICENSE
124
121
  - README.rdoc
125
- - Rakefile
126
122
  - Readme.md
127
123
  - bin/op5util
128
124
  - lib/op5util.rb
@@ -140,19 +136,6 @@ files:
140
136
  - lib/op5util/version.rb
141
137
  - op5util.gemspec
142
138
  - op5util.rdoc
143
- - pkg/op5util-0.0.1.gem
144
- - pkg/op5util-0.0.2.gem
145
- - pkg/op5util-0.0.3.gem
146
- - pkg/op5util-0.0.9.gem
147
- - pkg/op5util-0.1.0.gem
148
- - pkg/op5util-0.1.1.gem
149
- - pkg/op5util-0.1.2.gem
150
- - screenshots/host_op5.png
151
- - screenshots/host_op5_listview.png
152
- - screenshots/usecase1.png
153
- - screenshots/usecase2.png
154
- - test/default_test.rb
155
- - test/test_helper.rb
156
139
  homepage: https://github.com/np422/Op5util
157
140
  licenses:
158
141
  - MIT License
data/.gitignore DELETED
@@ -1,7 +0,0 @@
1
- pkg/*/
2
- !pkg/*pkg
3
- *~
4
- .bundle/
5
- vendor/
6
- pkg/op5util-0.0.*.gem
7
- .DS_Store
data/Gemfile DELETED
@@ -1,12 +0,0 @@
1
- source 'https://rubygems.org'
2
- gemspec
3
- gem 'colorize'
4
- gem 'httparty'
5
- gem 'terminal-table'
6
-
7
- group :development do
8
- gem 'awesome_print'
9
- gem 'rake'
10
- gem 'rdoc'
11
- gem 'test-unit'
12
- end
@@ -1,42 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- op5util (0.1.3)
5
- colorize (= 0.8.1)
6
- gli (= 2.16.1)
7
- httparty (= 0.15.5)
8
- terminal-table (= 1.8.0)
9
-
10
- GEM
11
- remote: https://rubygems.org/
12
- specs:
13
- awesome_print (1.7.0)
14
- colorize (0.8.1)
15
- gli (2.16.1)
16
- httparty (0.15.5)
17
- multi_xml (>= 0.5.2)
18
- multi_xml (0.6.0)
19
- power_assert (0.2.6)
20
- rake (12.0.0)
21
- rdoc (5.1.0)
22
- terminal-table (1.8.0)
23
- unicode-display_width (~> 1.1, >= 1.1.1)
24
- test-unit (3.2.5)
25
- power_assert
26
- unicode-display_width (1.2.1)
27
-
28
- PLATFORMS
29
- ruby
30
-
31
- DEPENDENCIES
32
- awesome_print
33
- colorize
34
- httparty
35
- op5util!
36
- rake
37
- rdoc
38
- terminal-table
39
- test-unit
40
-
41
- BUNDLED WITH
42
- 1.15.1
data/Rakefile DELETED
@@ -1,16 +0,0 @@
1
- require 'rake/clean'
2
- require 'rubygems'
3
- require 'rubygems/package_task'
4
- require 'rdoc/task'
5
- Rake::RDocTask.new do |rd|
6
- rd.main = "README.rdoc"
7
- rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
8
- rd.title = 'Your application title'
9
- end
10
-
11
- spec = eval(File.read('op5util.gemspec'))
12
-
13
- Gem::PackageTask.new(spec) do |pkg|
14
- end
15
-
16
- task :default => [:test]
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,14 +0,0 @@
1
- require 'test_helper'
2
-
3
- class DefaultTest < Test::Unit::TestCase
4
-
5
- def setup
6
- end
7
-
8
- def teardown
9
- end
10
-
11
- def test_the_truth
12
- assert true
13
- end
14
- end
@@ -1,9 +0,0 @@
1
- require 'test/unit'
2
-
3
- # Add test libraries you want to use here, e.g. mocha
4
-
5
- class Test::Unit::TestCase
6
-
7
- # Add global extensions to the test case class here
8
-
9
- end