oxidized 0.28.0 → 0.29.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +31 -0
- data/.github/workflows/codeql.yml +76 -0
- data/.github/workflows/publishdocker.yml +11 -2
- data/.github/workflows/ruby.yml +42 -0
- data/.github/workflows/stale.yml +16 -0
- data/.rubocop.yml +30 -10
- data/.rubocop_todo.yml +97 -43
- data/CHANGELOG.md +149 -2
- data/Dockerfile +15 -9
- data/README.md +63 -32
- data/Rakefile +2 -0
- data/docs/Configuration.md +49 -7
- data/docs/Creating-Models.md +24 -19
- data/docs/Hooks.md +35 -6
- data/docs/Model-Notes/ADVA.md +12 -0
- data/docs/Model-Notes/Cumulus.md +7 -1
- data/docs/Model-Notes/IOS.md +36 -0
- data/docs/Model-Notes/JunOS.md +3 -3
- data/docs/Model-Notes/LenovoNOS.md +29 -0
- data/docs/Model-Notes/LinksysSRW.md +15 -0
- data/docs/Model-Notes/Nokia.md +3 -0
- data/docs/Model-Notes/OS10.md +33 -0
- data/docs/Model-Notes/PanOS_API.md +28 -0
- data/docs/Model-Notes/README.md +2 -0
- data/docs/Ruby-API.md +12 -8
- data/docs/Sources.md +18 -0
- data/docs/Supported-OS-Types.md +51 -6
- data/docs/Troubleshooting.md +1 -1
- data/extra/gitdiff-msteams.sh +91 -0
- data/extra/nagios_check_failing_nodes.rb +6 -9
- data/extra/oxidized-report-git-commits +71 -14
- data/extra/oxidized.init +2 -5
- data/extra/oxidized.logrotate +1 -0
- data/extra/oxidized.runit +4 -1
- data/extra/oxidized.service +5 -8
- data/extra/rest_client.rb +1 -1
- data/extra/syslog.rb +2 -2
- data/lib/oxidized/cli.rb +1 -1
- data/lib/oxidized/config/vars.rb +5 -2
- data/lib/oxidized/config.rb +6 -3
- data/lib/oxidized/core.rb +1 -1
- data/lib/oxidized/hook/exec.rb +6 -6
- data/lib/oxidized/hook/githubrepo.rb +42 -11
- data/lib/oxidized/hook/slackdiff.rb +2 -2
- data/lib/oxidized/hook/xmppdiff.rb +45 -25
- data/lib/oxidized/hook.rb +4 -8
- data/lib/oxidized/input/exec.rb +1 -1
- data/lib/oxidized/input/input.rb +1 -0
- data/lib/oxidized/input/ssh.rb +23 -20
- data/lib/oxidized/input/telnet.rb +52 -44
- data/lib/oxidized/job.rb +1 -0
- data/lib/oxidized/jobs.rb +11 -6
- data/lib/oxidized/manager.rb +1 -0
- data/lib/oxidized/model/acmepacket.rb +40 -0
- data/lib/oxidized/model/acos.rb +3 -1
- data/lib/oxidized/model/acsw.rb +2 -0
- data/lib/oxidized/model/adtran.rb +7 -3
- data/lib/oxidized/model/adva.rb +68 -0
- data/lib/oxidized/model/aen.rb +2 -0
- data/lib/oxidized/model/aireos.rb +2 -0
- data/lib/oxidized/model/airfiber.rb +3 -1
- data/lib/oxidized/model/airos.rb +2 -0
- data/lib/oxidized/model/alteonos.rb +2 -0
- data/lib/oxidized/model/alvarion.rb +2 -0
- data/lib/oxidized/model/aos.rb +2 -0
- data/lib/oxidized/model/aos7.rb +2 -0
- data/lib/oxidized/model/aoscx.rb +98 -0
- data/lib/oxidized/model/aosw.rb +4 -2
- data/lib/oxidized/model/apc_aos.rb +2 -0
- data/lib/oxidized/model/arbos.rb +2 -0
- data/lib/oxidized/model/aricentiss.rb +2 -0
- data/lib/oxidized/model/asa.rb +4 -0
- data/lib/oxidized/model/asyncos.rb +2 -0
- data/lib/oxidized/model/audiocodes.rb +2 -0
- data/lib/oxidized/model/audiocodesmp.rb +2 -0
- data/lib/oxidized/model/awplus.rb +3 -1
- data/lib/oxidized/model/axos.rb +2 -0
- data/lib/oxidized/model/bdcom.rb +51 -0
- data/lib/oxidized/model/boss.rb +3 -1
- data/lib/oxidized/model/br6910.rb +2 -0
- data/lib/oxidized/model/c4cmts.rb +2 -0
- data/lib/oxidized/model/cambium.rb +2 -0
- data/lib/oxidized/model/cambiumepmp.rb +19 -0
- data/lib/oxidized/model/casa.rb +6 -1
- data/lib/oxidized/model/catos.rb +2 -0
- data/lib/oxidized/model/ciscoce.rb +14 -0
- data/lib/oxidized/model/cisconga.rb +2 -0
- data/lib/oxidized/model/ciscosma.rb +2 -0
- data/lib/oxidized/model/ciscosmb.rb +4 -0
- data/lib/oxidized/model/ciscovpn3k.rb +2 -0
- data/lib/oxidized/model/cnos.rb +2 -0
- data/lib/oxidized/model/comnetms.rb +2 -0
- data/lib/oxidized/model/comtrol.rb +2 -0
- data/lib/oxidized/model/comware.rb +17 -1
- data/lib/oxidized/model/coriant8600.rb +2 -0
- data/lib/oxidized/model/coriantgroove.rb +2 -0
- data/lib/oxidized/model/corianttmos.rb +2 -0
- data/lib/oxidized/model/cumulus.rb +60 -44
- data/lib/oxidized/model/datacom.rb +2 -0
- data/lib/oxidized/model/dcnos.rb +2 -0
- data/lib/oxidized/model/dellx.rb +3 -3
- data/lib/oxidized/model/dlink.rb +4 -1
- data/lib/oxidized/model/dnos.rb +2 -0
- data/lib/oxidized/model/eciapollo.rb +2 -0
- data/lib/oxidized/model/edgecos.rb +24 -2
- data/lib/oxidized/model/edgeos.rb +2 -0
- data/lib/oxidized/model/edgeswitch.rb +6 -4
- data/lib/oxidized/model/eltex.rb +50 -0
- data/lib/oxidized/model/enterasys.rb +20 -3
- data/lib/oxidized/model/enterasys800.rb +31 -0
- data/lib/oxidized/model/eos.rb +4 -1
- data/lib/oxidized/model/fabricos.rb +3 -1
- data/lib/oxidized/model/fastiron.rb +5 -2
- data/lib/oxidized/model/fiberdriver.rb +2 -0
- data/lib/oxidized/model/firebrick.rb +2 -0
- data/lib/oxidized/model/firelinuxos.rb +2 -0
- data/lib/oxidized/model/firewareos.rb +2 -0
- data/lib/oxidized/model/fortios.rb +26 -11
- data/lib/oxidized/model/fortiwlc.rb +26 -0
- data/lib/oxidized/model/ftos.rb +2 -0
- data/lib/oxidized/model/fujitsupy.rb +2 -0
- data/lib/oxidized/model/gaiaos.rb +42 -3
- data/lib/oxidized/model/gcombnps.rb +2 -0
- data/lib/oxidized/model/grandstream.rb +2 -0
- data/lib/oxidized/model/h3c.rb +42 -0
- data/lib/oxidized/model/hatteras.rb +4 -2
- data/lib/oxidized/model/hios.rb +40 -0
- data/lib/oxidized/model/hirschmann.rb +2 -0
- data/lib/oxidized/model/hpebladesystem.rb +3 -1
- data/lib/oxidized/model/hpemsa.rb +2 -0
- data/lib/oxidized/model/hpmsm.rb +2 -0
- data/lib/oxidized/model/ibos.rb +2 -0
- data/lib/oxidized/model/icotera.rb +2 -0
- data/lib/oxidized/model/ios.rb +15 -10
- data/lib/oxidized/model/iosxe.rb +1 -1
- data/lib/oxidized/model/iosxr.rb +2 -0
- data/lib/oxidized/model/ipos.rb +2 -0
- data/lib/oxidized/model/ironware.rb +10 -4
- data/lib/oxidized/model/isam.rb +2 -0
- data/lib/oxidized/model/junos.rb +7 -1
- data/lib/oxidized/model/lancom.rb +25 -0
- data/lib/oxidized/model/lenovonos.rb +84 -0
- data/lib/oxidized/model/linksyssrw.rb +73 -0
- data/lib/oxidized/model/linuxgeneric.rb +2 -0
- data/lib/oxidized/model/masteros.rb +2 -0
- data/lib/oxidized/model/mlnxos.rb +4 -0
- data/lib/oxidized/model/model.rb +35 -8
- data/lib/oxidized/model/mtrlrfs.rb +2 -0
- data/lib/oxidized/model/ndms.rb +3 -1
- data/lib/oxidized/model/necix.rb +32 -0
- data/lib/oxidized/model/netgear.rb +7 -2
- data/lib/oxidized/model/netonix.rb +2 -0
- data/lib/oxidized/model/netscaler.rb +40 -1
- data/lib/oxidized/model/nodegrid.rb +25 -0
- data/lib/oxidized/model/nos.rb +2 -0
- data/lib/oxidized/model/nsxconfig.rb +2 -0
- data/lib/oxidized/model/nsxfirewall.rb +2 -0
- data/lib/oxidized/model/nxos.rb +5 -2
- data/lib/oxidized/model/oneos.rb +2 -0
- data/lib/oxidized/model/openbsd.rb +11 -0
- data/lib/oxidized/model/opengear.rb +3 -1
- data/lib/oxidized/model/openwrt.rb +2 -0
- data/lib/oxidized/model/opnsense.rb +14 -4
- data/lib/oxidized/model/os10.rb +2 -0
- data/lib/oxidized/model/outputs.rb +2 -0
- data/lib/oxidized/model/panos.rb +2 -0
- data/lib/oxidized/model/panos_api.rb +73 -0
- data/lib/oxidized/model/pfsense.rb +14 -7
- data/lib/oxidized/model/planet.rb +2 -0
- data/lib/oxidized/model/powerconnect.rb +3 -3
- data/lib/oxidized/model/procurve.rb +4 -2
- data/lib/oxidized/model/purityos.rb +10 -1
- data/lib/oxidized/model/qtech.rb +2 -0
- data/lib/oxidized/model/quantaos.rb +3 -5
- data/lib/oxidized/model/raisecom.rb +2 -0
- data/lib/oxidized/model/routeros.rb +17 -2
- data/lib/oxidized/model/saos.rb +2 -0
- data/lib/oxidized/model/screenos.rb +2 -0
- data/lib/oxidized/model/sgos.rb +2 -0
- data/lib/oxidized/model/siklu.rb +2 -0
- data/lib/oxidized/model/slxos.rb +3 -0
- data/lib/oxidized/model/smartax.rb +2 -0
- data/lib/oxidized/model/smartcs.rb +42 -0
- data/lib/oxidized/model/sonicos.rb +11 -1
- data/lib/oxidized/model/speedtouch.rb +2 -0
- data/lib/oxidized/model/sros.rb +3 -1
- data/lib/oxidized/model/srosmd.rb +99 -0
- data/lib/oxidized/model/stoneos.rb +8 -2
- data/lib/oxidized/model/supermicro.rb +1 -1
- data/lib/oxidized/model/swos.rb +11 -0
- data/lib/oxidized/model/tdre.rb +2 -0
- data/lib/oxidized/model/telco.rb +2 -0
- data/lib/oxidized/model/timos.rb +1 -1
- data/lib/oxidized/model/tmos.rb +5 -2
- data/lib/oxidized/model/tplink.rb +4 -0
- data/lib/oxidized/model/trango.rb +13 -11
- data/lib/oxidized/model/truenas.rb +22 -0
- data/lib/oxidized/model/ucs.rb +2 -0
- data/lib/oxidized/model/viptela.rb +2 -0
- data/lib/oxidized/model/voltaire.rb +2 -0
- data/lib/oxidized/model/voss.rb +2 -0
- data/lib/oxidized/model/vrp.rb +3 -1
- data/lib/oxidized/model/vyatta.rb +2 -0
- data/lib/oxidized/model/weos.rb +2 -0
- data/lib/oxidized/model/xos.rb +6 -3
- data/lib/oxidized/model/yamaha.rb +59 -0
- data/lib/oxidized/model/zhoneolt.rb +2 -0
- data/lib/oxidized/model/zteolt.rb +54 -0
- data/lib/oxidized/model/zy1308.rb +13 -0
- data/lib/oxidized/model/zynos.rb +2 -0
- data/lib/oxidized/model/zynoscli.rb +2 -0
- data/lib/oxidized/model/zynosgs.rb +2 -0
- data/lib/oxidized/node/stats.rb +1 -0
- data/lib/oxidized/node.rb +16 -11
- data/lib/oxidized/nodes.rb +7 -6
- data/lib/oxidized/output/file.rb +2 -1
- data/lib/oxidized/output/git.rb +5 -3
- data/lib/oxidized/output/gitcrypt.rb +5 -8
- data/lib/oxidized/output/http.rb +2 -0
- data/lib/oxidized/source/csv.rb +1 -0
- data/lib/oxidized/source/http.rb +4 -0
- data/lib/oxidized/source/source.rb +7 -2
- data/lib/oxidized/source/sql.rb +15 -5
- data/lib/oxidized/version.rb +2 -2
- data/lib/oxidized/worker.rb +5 -5
- data/lib/oxidized.rb +1 -1
- data/lib/refinements.rb +43 -0
- data/oxidized.gemspec +22 -16
- metadata +120 -31
- data/.github/no-response.yml +0 -13
- data/.travis.yml +0 -10
- data/lib/oxidized/string.rb +0 -36
data/docs/Model-Notes/Nokia.md
CHANGED
@@ -7,3 +7,6 @@ Nokia ISAM might require disabling SSH keepalives.
|
|
7
7
|
[Reference](https://github.com/ytti/oxidized/issues/1482)
|
8
8
|
|
9
9
|
Back to [Model-Notes](README.md)
|
10
|
+
|
11
|
+
## Model-driven CLI in Nokia SR OS (starting from versions 16.1.R1)
|
12
|
+
New model `srosmd` is introduced which collects information in model-driven format.
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# OS10 Configuration
|
2
|
+
|
3
|
+
Disable banner/motd
|
4
|
+
|
5
|
+
```text
|
6
|
+
banner login disable
|
7
|
+
banner motd disable
|
8
|
+
```
|
9
|
+
|
10
|
+
Add allowed commands to privilege level 4
|
11
|
+
|
12
|
+
```text
|
13
|
+
privilege exec priv-lvl 4 "show inventory"
|
14
|
+
privilege exec priv-lvl 4 "show inventory media"
|
15
|
+
privilege exec priv-lvl 4 "show running-configuration"
|
16
|
+
```
|
17
|
+
|
18
|
+
Create the user will the role sysadmin (it will see the full config, including auth info and users) and the privilege level 4
|
19
|
+
|
20
|
+
```text
|
21
|
+
username oxidized password verysecurepassword role sysadmin priv-lvl 4
|
22
|
+
```
|
23
|
+
|
24
|
+
The commands Oxidized executes are:
|
25
|
+
|
26
|
+
1. terminal length 0
|
27
|
+
2. show inventory
|
28
|
+
3. show inventory media
|
29
|
+
4. show running-configuration
|
30
|
+
|
31
|
+
Oxidized can now retrieve your configuration!
|
32
|
+
|
33
|
+
Back to [Model-Notes](README.md)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# PanOS API
|
2
|
+
|
3
|
+
Backup Palo Alto XML configuration via the HTTP API. Works for PanOS and Panorama.
|
4
|
+
|
5
|
+
Logs in using username and password and fetches an API key.
|
6
|
+
|
7
|
+
## Requirements
|
8
|
+
|
9
|
+
- Create a user with a `Superuser (read-only)` admin role in Panorama or PanOS
|
10
|
+
- Make sure the `nokogiri` gem is installed with your oxidized host
|
11
|
+
|
12
|
+
## Configuration
|
13
|
+
|
14
|
+
Make sure the following is configured in the oxidized config:
|
15
|
+
|
16
|
+
```yaml
|
17
|
+
# allow ssl host name verification
|
18
|
+
resolve_dns: false
|
19
|
+
input:
|
20
|
+
default: ssh, http
|
21
|
+
http:
|
22
|
+
secure: true
|
23
|
+
ssl_verify: true
|
24
|
+
|
25
|
+
# model specific configuration
|
26
|
+
#model:
|
27
|
+
# panos_api:
|
28
|
+
```
|
data/docs/Model-Notes/README.md
CHANGED
@@ -17,8 +17,10 @@ Cisco IOS|[IOS](IOS.md)|29 Mar 2019
|
|
17
17
|
Juniper|[MX/QFX/EX/SRX/J Series](JunOS.md)|18 Jan 2018
|
18
18
|
Netgear|[Netgear](Netgear.md)|11 Apr 2018
|
19
19
|
Nokia|[Nokia ISAM](Nokia.md)|22 Aug 2018
|
20
|
+
Dell/EMC|[Dell EMC Networking OS10](OS10.md)|07 Dec 2021
|
20
21
|
Viptela|[Viptela](Viptela.md)|1 Jul 2018
|
21
22
|
Zyxel|[XGS4600 Series](XGS4600-Zyxel.md)|1 Feb 2018
|
22
23
|
Linux|[LinuxGeneric](LinuxGeneric.md)|10 Jun 2019
|
24
|
+
Lenovo|[Lenovo Network OS](LenovoNOS.md)|5 Apr 2022
|
23
25
|
|
24
26
|
If you discover additional caveats or problems please make sure to consult the [GitHub issues for oxidized](https://github.com/ytti/oxidized/issues) known issues.
|
data/docs/Ruby-API.md
CHANGED
@@ -8,12 +8,14 @@ The following objects exist in Oxidized.
|
|
8
8
|
* must implement 'connect', 'get', 'cmd'
|
9
9
|
* 'ssh', 'telnet', 'ftp', 'tftp', 'http' implemented
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
### http
|
12
|
+
|
13
|
+
* Communicates with a device over http/https
|
14
|
+
* Configurable variables from within model @username, @password, @headers.
|
15
|
+
* @username,@password are used in a Basic Authentication method.
|
16
|
+
* @headers is a Hash of key value pairs of headers to pass along with the request.
|
17
|
+
* Within the sources config under input you define a YAML stanza like the below, this will tell Oxidized to validate certificates on the request
|
18
|
+
|
17
19
|
```yaml
|
18
20
|
input:
|
19
21
|
http:
|
@@ -177,10 +179,12 @@ Resets the existing block, allowing the user to completely override its contents
|
|
177
179
|
Ensures that the contents of the block are prepended, rather than appended (the
|
178
180
|
default) to an existing block.
|
179
181
|
|
180
|
-
###
|
182
|
+
### Refinements
|
183
|
+
|
184
|
+
#### `String` convenience methods
|
181
185
|
|
182
186
|
Since configuration processing tasks are occasionally similar across models,
|
183
|
-
Oxidized provides an
|
187
|
+
Oxidized provides an refined [`String`](../lib/refinements.rb) class with the
|
184
188
|
intention of providing convenience methods and eliminating code duplication.
|
185
189
|
|
186
190
|
#### `cut_tail`
|
data/docs/Sources.md
CHANGED
@@ -85,6 +85,23 @@ source:
|
|
85
85
|
enable: enable
|
86
86
|
```
|
87
87
|
|
88
|
+
### MySQL with TLS support
|
89
|
+
By default SSL is disabled, but if you would like enable connection via TLS add the following configuration:
|
90
|
+
```yaml
|
91
|
+
source:
|
92
|
+
default: sql
|
93
|
+
sql:
|
94
|
+
...
|
95
|
+
with_ssl: true
|
96
|
+
ssl_mode: <mode>
|
97
|
+
ssl_ca: <path to CA certificate>
|
98
|
+
ssl_cert: <path to client certificate>
|
99
|
+
ssl_key: <path to client certificate key>
|
100
|
+
```
|
101
|
+
ssl_mode may be one of the next: disabled / preferred / required / verify_ca / verify_identity
|
102
|
+
|
103
|
+
For more information visit: https://github.com/brianmario/mysql2
|
104
|
+
|
88
105
|
## Source: SQLite
|
89
106
|
|
90
107
|
One row per device, filtered by hostname.
|
@@ -148,6 +165,7 @@ source:
|
|
148
165
|
delimiter: !ruby/regexp /:/
|
149
166
|
user: username
|
150
167
|
pass: password
|
168
|
+
read_timeout: 120
|
151
169
|
map:
|
152
170
|
name: hostname
|
153
171
|
model: os
|
data/docs/Supported-OS-Types.md
CHANGED
@@ -6,6 +6,8 @@
|
|
6
6
|
* [ACOS](/lib/oxidized/model/acos.rb)
|
7
7
|
* Accedian Performance Elements (NIDs)
|
8
8
|
* [AEN](/lib/oxidized/model/aen.rb)
|
9
|
+
* Acme Packet
|
10
|
+
* [ACMEPACKET](/lib/oxidized/model/acmepacket.rb)
|
9
11
|
* Adtran
|
10
12
|
* [Total Access (AOS)](/lib/oxidized/model/adtran.rb)
|
11
13
|
* Alcatel-Lucent
|
@@ -28,6 +30,7 @@
|
|
28
30
|
* Arris
|
29
31
|
* [C4CMTS](/lib/oxidized/model/c4cmts.rb)
|
30
32
|
* Aruba
|
33
|
+
* [AOS-CX](/lib/oxidized/model/aoscx.rb)
|
31
34
|
* [AOSW](/lib/oxidized/model/aosw.rb)
|
32
35
|
* AudioCodes
|
33
36
|
* [AudioCodes](/lib/oxdized/model/audiocodes.rb)
|
@@ -35,6 +38,15 @@
|
|
35
38
|
* Avaya
|
36
39
|
* [VOSS (VSP Operating System Software)](/lib/oxidized/model/voss.rb)
|
37
40
|
* [BOSS (Baystack Operating System Software)](/lib/oxidized/model/boss.rb)
|
41
|
+
* BDCOM
|
42
|
+
* [S2200 series](/lib/oxidized/model/bdcom.rb)
|
43
|
+
* [S2200PB series](/lib/oxidized/model/bdcom.rb)
|
44
|
+
* [S2200-B series](/lib/oxidized/model/bdcom.rb)
|
45
|
+
* [S2500-B series](/lib/oxidized/model/bdcom.rb)
|
46
|
+
* [S2500-C series](/lib/oxidized/model/bdcom.rb)
|
47
|
+
* [S2500PB series](/lib/oxidized/model/bdcom.rb)
|
48
|
+
* [S2500-P series](/lib/oxidized/model/bdcom.rb)
|
49
|
+
* [S2900 series](/lib/oxidized/model/bdcom.rb)
|
38
50
|
* Brocade
|
39
51
|
* [FabricOS](/lib/oxidized/model/fabricos.rb)
|
40
52
|
* [FastIron](/lib/oxidized/model/fastiron.rb)
|
@@ -47,6 +59,7 @@
|
|
47
59
|
* [AXOS](/lib/oxidized/model/axos.rb)
|
48
60
|
* Cambium
|
49
61
|
* [Cambium (PMP450 Series)](/lib/oxidized/model/cambium.rb)
|
62
|
+
* [Cambium (ePMP Series)](/lib/oxidized/model/cambiumepmp.rb)
|
50
63
|
* Casa
|
51
64
|
* [Casa](/lib/oxidized/model/casa.rb)
|
52
65
|
* Centec Networks
|
@@ -61,7 +74,8 @@
|
|
61
74
|
* [ASA](/lib/oxidized/model/asa.rb)
|
62
75
|
* [AsyncOS](/lib/oxidized/model/asyncos.rb)
|
63
76
|
* [CatOS](/lib/oxidized/model/catos.rb)
|
64
|
-
* [
|
77
|
+
* [Cisco Catalyst Express](/lib/oxidized/model/ciscoce.rb)
|
78
|
+
* [FireLinuxOS](/lib/oxidized/model/firelinuxos.rb)
|
65
79
|
* [IOS](/lib/oxidized/model/ios.rb)
|
66
80
|
* [IOSXR](/lib/oxidized/model/iosxr.rb)
|
67
81
|
* [NGA](/lib/oxidized/model/cisconga.rb)
|
@@ -96,11 +110,15 @@
|
|
96
110
|
* ECI Telecom
|
97
111
|
* [ECIapollo](/lib/oxidized/model/eciapollo.rb)
|
98
112
|
* EdgeCore
|
99
|
-
* [ES3528M](/lib/oxidized/model/edgecos.rb)
|
113
|
+
* [ECS3510, ES3528M](/lib/oxidized/model/edgecos.rb)
|
114
|
+
* [ECS3510, ES3526XA-V2, ES3528M](/lib/oxidized/model/edgecos.rb)
|
115
|
+
* Eltex
|
116
|
+
* [Eltex](/lib/oxidized/model/eltex.rb)
|
100
117
|
* Ericsson/Redback
|
101
118
|
* [IPOS (former SEOS)](/lib/oxidized/model/ipos.rb)
|
102
119
|
* Extreme Networks
|
103
|
-
* [Enterasys](/lib/oxidized/model/enterasys.rb)
|
120
|
+
* [Enterasys B/C-Series](/lib/oxidized/model/enterasys.rb)
|
121
|
+
* [Enterasys 800-Series](/lib/oxidized/model/enterasys800.rb)
|
104
122
|
* [WM](/lib/oxidized/model/mtrlrfs.rb)
|
105
123
|
* [XOS](/lib/oxidized/model/xos.rb)
|
106
124
|
* [ExtremeWare](/lib/oxidized/model/xos.rb)
|
@@ -109,6 +127,7 @@
|
|
109
127
|
* Fiberstore
|
110
128
|
* [S3800](/lib/oxidized/model/gcombnps.rb)
|
111
129
|
* [S3900](/lib/oxidized/model/edgecos.rb)
|
130
|
+
* [S3900-R](/lib/oxidized/model/bdcom.rb)
|
112
131
|
* [S5800](/lib/oxidized/model/cnos.rb)
|
113
132
|
* [S5850](/lib/oxidized/model/cnos.rb)
|
114
133
|
* Firebrick
|
@@ -118,6 +137,8 @@
|
|
118
137
|
* [FTOS](/lib/oxidized/model/ftos.rb)
|
119
138
|
* FortiGate
|
120
139
|
* [FortiOS](/lib/oxidized/model/fortios.rb)
|
140
|
+
* FortiWLC
|
141
|
+
* [FortiWLC](/lib/oxidized/model/fortiwlc.rb)
|
121
142
|
* Fujitsu
|
122
143
|
* [PRIMERGY Blade switch 1/10Gbe](/lib/oxidized/model/fujitsupy.rb)
|
123
144
|
* GCOM Technologies
|
@@ -129,13 +150,16 @@
|
|
129
150
|
* Hillstone Networks
|
130
151
|
* [StoneOS](/lib/oxidized/model/stoneos.rb)
|
131
152
|
* Hirschmann
|
132
|
-
* [
|
153
|
+
* [Classic](/lib/oxidized/model/hirschmann.rb)
|
154
|
+
* [HiOS](/lib/oxidized/model/hios.rb)
|
133
155
|
* HP
|
134
156
|
* [Comware (HP A-series, H3C, 3Com)](/lib/oxidized/model/comware.rb)
|
135
157
|
* [Procurve](/lib/oxidized/model/procurve.rb)
|
136
158
|
* [BladeSystem (Onboard Administrator)](/lib/oxidized/model/hpebladesystem.rb)
|
137
159
|
* [MSA](/lib/oxidized/model/hpemsa.rb)
|
138
160
|
* [MSM (Wireless Controller)](/lib/oxidized/model/hpmsm.rb)
|
161
|
+
* H3C
|
162
|
+
* [S6520X](/lib/oxidized/model/h3c.rb)
|
139
163
|
* Huawei
|
140
164
|
* [VRP](/lib/oxidized/model/vrp.rb)
|
141
165
|
* [SmartAX series](/lib/oxidized/model/smartax.rb)
|
@@ -144,6 +168,12 @@
|
|
144
168
|
* Juniper
|
145
169
|
* [JunOS](/lib/oxidized/model/junos.rb)
|
146
170
|
* [ScreenOS (Netscreen)](/lib/oxidized/model/screenos.rb)
|
171
|
+
* LANCOM Systems GmbH
|
172
|
+
* [LCOS](/lib/oxidized/model/lancom.rb)
|
173
|
+
* Lenovo
|
174
|
+
* [Lenovo Network OS](/lib/oxidized/model/lenovonos.rb)
|
175
|
+
* Linkys
|
176
|
+
* [SRW](/lib/oxidized/model/linksyssrw.rb)
|
147
177
|
* Linuxgeneric
|
148
178
|
* [CentOS](/lib/oxidized/model/linuxgeneric.rb)
|
149
179
|
* Mellanox
|
@@ -151,11 +181,14 @@
|
|
151
181
|
* [Voltaire](/lib/oxidized/model/voltaire.rb)
|
152
182
|
* Mikrotik
|
153
183
|
* [RouterOS](/lib/oxidized/model/routeros.rb)
|
184
|
+
* [SwOS and SwOS Lite](/lib/oxidized/model/swos.rb)
|
154
185
|
* Motorola
|
155
186
|
* [RFS](/lib/oxidized/model/mtrlrfs.rb)
|
156
187
|
* MRV
|
157
188
|
* [MasterOS](/lib/oxidized/model/masteros.rb)
|
158
189
|
* [FiberDriver](/lib/oxidized/model/fiberdriver.rb)
|
190
|
+
* NEC
|
191
|
+
* [NEC IX](/lib/oxidized/model/necix.rb)
|
159
192
|
* Netgear
|
160
193
|
* [Netgear switches](/lib/oxidized/model/netgear.rb)
|
161
194
|
* Netonix
|
@@ -171,7 +204,8 @@
|
|
171
204
|
* [OpenWRT](/lib/oxidized/model/openwrt.rb)
|
172
205
|
* [OPNsense](/lib/oxidized/model/opnsense.rb)
|
173
206
|
* Palo Alto
|
174
|
-
* [
|
207
|
+
* [PanOS API](/lib/oxidized/model/panos_api.rb)
|
208
|
+
* [PanOS](/lib/oxidized/model/panos.rb)
|
175
209
|
* [PLANET SG/SGS Switches](/lib/oxidized/model/planet.rb)
|
176
210
|
* [pfSense](/lib/oxidized/model/pfsense.rb)
|
177
211
|
* Pure Storage
|
@@ -186,8 +220,10 @@
|
|
186
220
|
* [Quanta / VxWorks 6.6 (1.1.0.8)](/lib/oxidized/model/quantaos.rb)
|
187
221
|
* Siklu
|
188
222
|
* [EtherHaul](/lib/oxidized/model/siklu.rb)
|
223
|
+
* Seiko Solutions
|
224
|
+
* [SmartCS, SmartCS mini](/lib/oxidized/model/smartcs.rb)
|
189
225
|
* SonicWALL
|
190
|
-
* [SonicOS](lib/oxidized/model/sonicos.rb)
|
226
|
+
* [SonicOS](/lib/oxidized/model/sonicos.rb)
|
191
227
|
* SNR
|
192
228
|
* [SNR-S300G, S2xxx, S3xxx, S4xxx](/lib/oxidized/model/dcnos.rb)
|
193
229
|
* Speedtouch
|
@@ -203,6 +239,8 @@
|
|
203
239
|
* [Telco Systems T-Marc 3306](/lib/oxidized/model/telco.rb)
|
204
240
|
* Trango Systems
|
205
241
|
* [Trango](/lib/oxidized/model/trango.rb)
|
242
|
+
* TrueNAS
|
243
|
+
* [TrueNAS](/lib/oxidized/model/truenas.rb)
|
206
244
|
* TPLink
|
207
245
|
* [TPLink](/lib/oxidized/model/tplink.rb)
|
208
246
|
* [TL-SL5428](/lib/oxidized/model/edgecos.rb)
|
@@ -219,9 +257,16 @@
|
|
219
257
|
* [Fireware OS](/lib/oxidized/model/firewareos.rb)
|
220
258
|
* Westell
|
221
259
|
* [Westell 8178G, Westell 8266G](/lib/oxidized/model/weos.rb)
|
260
|
+
* YAMAHA
|
261
|
+
* [YAMAHA NVR/RTX Series](/lib/oxidized/model/yamaha.rb)
|
222
262
|
* Zhone
|
223
263
|
* [Zhone (OLT and MX)](/lib/oxidized/model/zhoneolt.rb)
|
264
|
+
* ZPE
|
265
|
+
* [Nodegrid OS](/lib/oxidized/model/nodegrid.rb)
|
266
|
+
* ZTE
|
267
|
+
* [C300&C320 OLT](/lib/oxidized/model/zteolt.rb)
|
224
268
|
* Zyxel
|
225
269
|
* [ZyNOS](/lib/oxidized/model/zynos.rb)
|
226
270
|
* [ZyNOS GS-series variant](/lib/oxidized/model/zynosgs.rb)
|
227
271
|
* [NDMS](/lib/oxidized/model/ndms.rb)
|
272
|
+
* [1308](/lib/oxidized/model/zy1308.rb)
|
data/docs/Troubleshooting.md
CHANGED
@@ -53,7 +53,7 @@ irb(main):003:0> '$EKRET-5A-X20#'.match /^([\$\w.@()-]+[#>]\s?)$/
|
|
53
53
|
=> #<MatchData "$EKRET-5A-X20#" 1:"$EKRET-5A-X20#">
|
54
54
|
```
|
55
55
|
|
56
|
-
The new prompt now matches. You can copy the current model into the `~/.config/oxidized/` directory (keeping the original file name), and modify the prompt within the model file. After restarting Oxidized, the adapted model will be used.
|
56
|
+
The new prompt now matches. You can copy the current model into the `~/.config/oxidized/model/` directory (keeping the original file name), and modify the prompt within the model file. After restarting Oxidized, the adapted model will be used.
|
57
57
|
|
58
58
|
*Troubleshooting an overly greedy prompt:*
|
59
59
|
|
@@ -0,0 +1,91 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
# Posts a git diff to MS Team Channel using webhooks
|
3
|
+
#
|
4
|
+
# Usage:
|
5
|
+
# Make sure jq and curl are installed.
|
6
|
+
# Save this script in /var/lib/oxidized/extra/
|
7
|
+
# Add to oxidized config:
|
8
|
+
#
|
9
|
+
# hooks:
|
10
|
+
# ms_teams_webhook:
|
11
|
+
# type: exec
|
12
|
+
# events: [post_store]
|
13
|
+
# cmd: '/var/lib/oxidized/extra/gitdiff-msteams.sh'
|
14
|
+
# async: true
|
15
|
+
# timeout: 120
|
16
|
+
#
|
17
|
+
# Add webhook to your MS Teams channel and set the next variable to the full url
|
18
|
+
|
19
|
+
weburl="https://contoso.webhook.office.com/webhookb2/etc etc etc"
|
20
|
+
|
21
|
+
postdata()
|
22
|
+
{
|
23
|
+
COMMIT=$(git --bare --git-dir="${OX_REPO_NAME}" show --pretty='' --no-color "${OX_REPO_COMMITREF}" | jq --raw-input --slurp --compact-output)
|
24
|
+
cat <<EOF
|
25
|
+
{
|
26
|
+
"type":"message",
|
27
|
+
"attachments":[
|
28
|
+
{
|
29
|
+
"contentType":"application/vnd.microsoft.card.adaptive",
|
30
|
+
"contentUrl":null,
|
31
|
+
"content":{
|
32
|
+
"$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
|
33
|
+
"type":"AdaptiveCard",
|
34
|
+
"version":"1.2",
|
35
|
+
"msTeams": { "width": "full" },
|
36
|
+
"body":[
|
37
|
+
{
|
38
|
+
"type": "TextBlock",
|
39
|
+
"text": "Oxidized update for ${OX_NODE_NAME}",
|
40
|
+
"size": "medium",
|
41
|
+
"weight": "Bolder",
|
42
|
+
"style": "heading",
|
43
|
+
"wrap": "true"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"type": "FactSet",
|
47
|
+
"facts": [
|
48
|
+
{
|
49
|
+
"title": "Node name",
|
50
|
+
"value": "${OX_NODE_NAME}"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"title": "Job status",
|
54
|
+
"value": "${OX_JOB_STATUS}"
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"title": "Job time",
|
58
|
+
"value": "${OX_JOB_TIME}"
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"title": "Git repo",
|
62
|
+
"value": "${OX_REPO_NAME}"
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"title": "Git commit ID",
|
66
|
+
"value": "${OX_REPO_COMMITREF}"
|
67
|
+
}
|
68
|
+
]
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"type": "RichTextBlock",
|
72
|
+
"inlines": [
|
73
|
+
{
|
74
|
+
"type": "TextRun",
|
75
|
+
"text": ${COMMIT},
|
76
|
+
"fontType": "monospace",
|
77
|
+
"size": "small"
|
78
|
+
}
|
79
|
+
]
|
80
|
+
}
|
81
|
+
]
|
82
|
+
}
|
83
|
+
}
|
84
|
+
]
|
85
|
+
}
|
86
|
+
EOF
|
87
|
+
}
|
88
|
+
|
89
|
+
curl -i \
|
90
|
+
-H "Content-Type: application/json" \
|
91
|
+
-X POST --data "$(postdata)" "${weburl}"
|
@@ -12,17 +12,14 @@ pending_nodes = []
|
|
12
12
|
|
13
13
|
json = JSON.parse(open("http://localhost:8888/nodes.json").read)
|
14
14
|
json.each do |node|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
if not node['last'].nil?
|
19
|
-
if node['last']['status'] != 'success'
|
20
|
-
critical_nodes << node['name']
|
21
|
-
critical = true
|
22
|
-
end
|
23
|
-
else
|
15
|
+
next if !ARGV.empty? && (ARGV[0] != node['name'])
|
16
|
+
|
17
|
+
if node['last'].nil?
|
24
18
|
pending_nodes << node['name']
|
25
19
|
pending = true
|
20
|
+
elsif node['last']['status'] != 'success'
|
21
|
+
critical_nodes << node['name']
|
22
|
+
critical = true
|
26
23
|
end
|
27
24
|
end
|
28
25
|
|
@@ -21,41 +21,98 @@
|
|
21
21
|
# Removed requirement for Git working directory
|
22
22
|
# Check job status
|
23
23
|
#
|
24
|
+
# 20200926 - Nick Hilliard <nick@foobar.org>
|
25
|
+
# sends email
|
26
|
+
# add command-line options to stop blank emails from being sent
|
27
|
+
# more sanity-checking
|
24
28
|
#
|
25
29
|
# usage: add the following hook to the oxidized config file:
|
26
30
|
#
|
31
|
+
# --
|
27
32
|
# hooks:
|
28
33
|
# email_output:
|
29
34
|
# type: exec
|
30
35
|
# events: [post_store, node_fail]
|
31
|
-
# cmd: '/home/oxidized/extra/oxidized-report-git-commits
|
36
|
+
# cmd: '/home/oxidized/extra/oxidized-report-git-commits -s "Oxidized updates for ${OX_NODE_NAME}" -r update-recipient@example.com'
|
32
37
|
# async: true
|
33
38
|
# timeout: 120
|
34
|
-
#
|
39
|
+
# --
|
35
40
|
#
|
41
|
+
# Options:
|
42
|
+
# -r email_recipient - send email to specified recipient
|
43
|
+
# -s email_subject - specify the email subject line
|
44
|
+
# -f - don't send email if git fails to find commit
|
45
|
+
#
|
46
|
+
|
47
|
+
trap '/bin/rm -f "$tmpfile"' EXIT
|
48
|
+
|
49
|
+
tmpfile=$(mktemp) || exit 1
|
50
|
+
|
51
|
+
subject="Oxidized updates for ${OX_NODE_NAME}"
|
52
|
+
scriptname=`basename $0`
|
53
|
+
|
54
|
+
usage()
|
55
|
+
{
|
56
|
+
echo "Usage: ${scriptname} [-f] [ -s email_subject ] [ -r email_recipient ]"
|
57
|
+
exit 1
|
58
|
+
}
|
59
|
+
|
60
|
+
email_on_gitfail=1
|
61
|
+
while getopts "fs:r:" opt; do
|
62
|
+
case $opt in
|
63
|
+
s)
|
64
|
+
subject=$OPTARG
|
65
|
+
;;
|
66
|
+
r)
|
67
|
+
recipient=$OPTARG
|
68
|
+
;;
|
69
|
+
f)
|
70
|
+
email_on_gitfail=0
|
71
|
+
;;
|
72
|
+
*)
|
73
|
+
usage
|
74
|
+
;;
|
75
|
+
esac
|
76
|
+
done
|
36
77
|
|
37
|
-
echo "Node name: ${OX_NODE_NAME}"
|
38
|
-
echo "Group name: ${OX_NODE_GROUP}"
|
39
|
-
echo "Job status: ${OX_JOB_STATUS}"
|
40
|
-
echo "Job time: ${OX_JOB_TIME}"
|
41
78
|
|
42
79
|
if [ "${OX_EVENT}" = "node_fail" ]; then
|
43
|
-
echo 'Job failed'
|
80
|
+
echo "${scriptname}: ${OX_NODE_NAME}": 'Job failed'
|
44
81
|
exit 64
|
45
82
|
fi
|
46
83
|
|
47
84
|
if [ -z "${OX_REPO_COMMITREF}" ]; then
|
48
|
-
echo '$OX_REPO_COMMITREF not set'
|
85
|
+
echo "${scriptname}: "'$OX_REPO_COMMITREF not set'
|
49
86
|
exit 64
|
50
87
|
fi
|
51
88
|
|
52
89
|
if [ -z "${OX_REPO_NAME}" ]; then
|
53
|
-
echo '$OX_REPO_NAME not set'
|
90
|
+
echo "${scriptname}: "'$OX_REPO_NAME not set'
|
54
91
|
exit 64
|
55
92
|
fi
|
56
|
-
|
57
|
-
echo "Git repo: ${OX_REPO_NAME}"
|
58
|
-
echo "Git commit ID: ${OX_REPO_COMMITREF}"
|
59
|
-
echo ""
|
60
93
|
|
61
|
-
|
94
|
+
cat > ${tmpfile} <<EOF
|
95
|
+
Node name: ${OX_NODE_NAME}
|
96
|
+
Group name: ${OX_NODE_GROUP}
|
97
|
+
Job status: ${OX_JOB_STATUS}
|
98
|
+
Job time: ${OX_JOB_TIME}
|
99
|
+
Git repo: ${OX_REPO_NAME}
|
100
|
+
Git commit ID: ${OX_REPO_COMMITREF}
|
101
|
+
|
102
|
+
EOF
|
103
|
+
|
104
|
+
# test if commit exists
|
105
|
+
git --bare --git-dir="${OX_REPO_NAME}" rev-parse --quiet --verify "${OX_REPO_COMMITREF}" > /dev/null 2>&1
|
106
|
+
gitret=$?
|
107
|
+
|
108
|
+
if [ ${gitret} -eq 0 ]; then
|
109
|
+
git --bare --git-dir="${OX_REPO_NAME}" show --pretty='' --no-color "${OX_REPO_COMMITREF}" >> ${tmpfile} 2>&1
|
110
|
+
else
|
111
|
+
echo "${scriptname}: commit ${OX_REPO_COMMITREF} does not exist" >> ${tmpfile}
|
112
|
+
fi
|
113
|
+
|
114
|
+
if [ ! -z "${recipient}" -a \( ${gitret} -eq 0 -o ${email_on_gitfail} -eq 1 \) ]; then
|
115
|
+
cat ${tmpfile} | mail -s "${subject}" "${recipient}"
|
116
|
+
else
|
117
|
+
cat ${tmpfile}
|
118
|
+
fi
|
data/extra/oxidized.init
CHANGED
@@ -18,7 +18,6 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
|
|
18
18
|
DAEMON=$(which oxidized)
|
19
19
|
NAME="oxidized"
|
20
20
|
DESC="Oxidized - Network Device Configuration Backup Tool"
|
21
|
-
ARGS=""
|
22
21
|
USER="oxidized"
|
23
22
|
|
24
23
|
test -x $DAEMON || exit 0
|
@@ -29,20 +28,18 @@ if [ -r /etc/default/$NAME ]; then
|
|
29
28
|
. /etc/default/$NAME
|
30
29
|
fi
|
31
30
|
|
32
|
-
CONFIG="${CONFIG:-/etc/oxidized/config}"
|
33
|
-
|
34
31
|
PIDFILE=/var/run/$NAME.pid
|
35
32
|
|
36
33
|
do_start()
|
37
34
|
{
|
38
35
|
start-stop-daemon --start --quiet --background --pidfile $PIDFILE --make-pidfile \
|
39
|
-
--oknodo --chuid $USER --exec $DAEMON
|
36
|
+
--oknodo --chuid $USER --exec $DAEMON
|
40
37
|
}
|
41
38
|
|
42
39
|
do_stop()
|
43
40
|
{
|
44
41
|
start-stop-daemon --oknodo --stop --quiet -v --pidfile $PIDFILE \
|
45
|
-
--chuid $USER --retry KILL/10
|
42
|
+
--chuid $USER --retry KILL/10
|
46
43
|
}
|
47
44
|
|
48
45
|
case "$1" in
|
data/extra/oxidized.logrotate
CHANGED
data/extra/oxidized.runit
CHANGED
@@ -1,2 +1,5 @@
|
|
1
1
|
#!/bin/bash
|
2
|
-
|
2
|
+
[ ! -d /home/oxidized/.config/oxidized ] && mkdir -p /home/oxidized/.config/oxidized
|
3
|
+
[ -f /home/oxidized/.config/oxidized/pid ] && rm /home/oxidized/.config/oxidized/pid
|
4
|
+
chown -R oxidized:oxidized /home/oxidized/.config/oxidized
|
5
|
+
exec setuser oxidized oxidized
|
data/extra/oxidized.service
CHANGED
@@ -1,12 +1,9 @@
|
|
1
|
-
#
|
2
|
-
#To set OXIDIZED_HOME instead of the default:
|
3
|
-
# ~${oxidized_user}/.config/oxidized in debian 8, then uncomment
|
4
|
-
#(and modify as required) the "Environment" variable below so
|
5
|
-
#systemd sets the correct environment. Tested only on Debian 8.8.
|
6
|
-
#YMMV otherwise.
|
1
|
+
# Put this file in /etc/systemd/system.
|
7
2
|
#
|
8
|
-
#
|
9
|
-
#
|
3
|
+
# To set OXIDIZED_HOME instead of the default,
|
4
|
+
# ~oxidized/.config/oxidized, uncomment (and modify as required) the
|
5
|
+
# "Environment" variable below so systemd sets the correct
|
6
|
+
# environment.
|
10
7
|
|
11
8
|
[Unit]
|
12
9
|
Description=Oxidized - Network Device Configuration Backup Tool
|
data/extra/rest_client.rb
CHANGED
@@ -6,7 +6,7 @@ module Oxidized
|
|
6
6
|
require 'asetus'
|
7
7
|
|
8
8
|
class Config
|
9
|
-
Root = Root = ENV['OXIDIZED_HOME'] || File.join(
|
9
|
+
Root = Root = ENV['OXIDIZED_HOME'] || File.join(Dir.home, '.config', 'oxidized')
|
10
10
|
end
|
11
11
|
|
12
12
|
CFGS = Asetus.new name: 'oxidized', load: false, key_to_s: true
|
data/extra/syslog.rb
CHANGED
@@ -29,7 +29,7 @@ require_relative 'rest_client'
|
|
29
29
|
module Oxidized
|
30
30
|
require 'asetus'
|
31
31
|
class Config
|
32
|
-
Root = File.join
|
32
|
+
Root = File.join Dir.home, '.config', 'oxidized'
|
33
33
|
end
|
34
34
|
|
35
35
|
CFGS = Asetus.new name: 'oxidized', load: false, key_to_s: true
|
@@ -105,7 +105,7 @@ module Oxidized
|
|
105
105
|
end
|
106
106
|
|
107
107
|
def handle_log(log, ipaddr)
|
108
|
-
log = log.to_s.split
|
108
|
+
log = log.to_s.split
|
109
109
|
index, vendor = MSG.find do |key, value|
|
110
110
|
index = log.find_index { |e| e.match value }
|
111
111
|
break index, key if index
|
data/lib/oxidized/cli.rb
CHANGED
@@ -72,7 +72,7 @@ module Oxidized
|
|
72
72
|
|
73
73
|
begin
|
74
74
|
File.open(pidfile, ::File::CREAT | ::File::EXCL | ::File::WRONLY) { |f| f.write(Process.pid.to_s) }
|
75
|
-
at_exit {
|
75
|
+
at_exit { FileUtils.rm_f(pidfile) }
|
76
76
|
rescue Errno::EEXIST
|
77
77
|
check_pid
|
78
78
|
retry
|