oxidized 0.33.0 → 0.34.0
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/.github/ISSUE_TEMPLATE/bug_report.md +4 -1
- data/.github/ISSUE_TEMPLATE/support-request.md +4 -1
- data/.github/workflows/ruby.yml +4 -2
- data/.gitignore +1 -0
- data/.rubocop.yml +29 -6
- data/.rubocop_todo.yml +2 -35
- data/CHANGELOG.md +49 -0
- data/CONTRIBUTING.md +10 -3
- data/Dockerfile +4 -4
- data/README.md +52 -55
- data/Rakefile +2 -3
- data/docs/Configuration.md +97 -0
- data/docs/DeviceSimulation.md +19 -7
- data/docs/Docker.md +9 -4
- data/docs/Issues.md +11 -2
- data/docs/ModelUnitTests.md +35 -25
- data/docs/Outputs.md +83 -2
- data/docs/Release.md +30 -22
- data/docs/Supported-OS-Types.md +4 -0
- data/docs/Troubleshooting.md +4 -18
- data/extra/device2yaml.rb +24 -9
- data/extra/rest_client.rb +2 -1
- data/extra/syslog.rb +8 -3
- data/lib/oxidized/cli.rb +7 -3
- data/lib/oxidized/config/vars.rb +7 -3
- data/lib/oxidized/config.rb +0 -1
- data/lib/oxidized/core.rb +5 -4
- data/lib/oxidized/hook/ciscosparkdiff.rb +11 -9
- data/lib/oxidized/hook/exec.rb +5 -4
- data/lib/oxidized/hook/githubrepo.rb +23 -17
- data/lib/oxidized/hook/noophook.rb +2 -2
- data/lib/oxidized/hook/slackdiff.rb +9 -8
- data/lib/oxidized/hook/xmppdiff.rb +9 -9
- data/lib/oxidized/hook.rb +10 -8
- data/lib/oxidized/input/cli.rb +8 -3
- data/lib/oxidized/input/exec.rb +1 -1
- data/lib/oxidized/input/ftp.rb +2 -2
- data/lib/oxidized/input/http.rb +5 -5
- data/lib/oxidized/input/input.rb +1 -0
- data/lib/oxidized/input/scp.rb +2 -2
- data/lib/oxidized/input/ssh.rb +21 -14
- data/lib/oxidized/input/telnet.rb +3 -3
- data/lib/oxidized/input/tftp.rb +1 -1
- data/lib/oxidized/job.rb +7 -4
- data/lib/oxidized/logger.rb +51 -0
- data/lib/oxidized/model/acos.rb +1 -0
- data/lib/oxidized/model/aos7.rb +6 -0
- data/lib/oxidized/model/aoscx.rb +2 -0
- data/lib/oxidized/model/aosw.rb +22 -17
- data/lib/oxidized/model/aricentiss.rb +2 -2
- data/lib/oxidized/model/asa.rb +3 -3
- data/lib/oxidized/model/awplus.rb +13 -10
- data/lib/oxidized/model/edgecos.rb +2 -1
- data/lib/oxidized/model/edgeos.rb +7 -6
- data/lib/oxidized/model/edgeswitch.rb +3 -1
- data/lib/oxidized/model/efos.rb +41 -0
- data/lib/oxidized/model/eltex.rb +1 -1
- data/lib/oxidized/model/fabricos.rb +1 -1
- data/lib/oxidized/model/fastiron.rb +3 -1
- data/lib/oxidized/model/firelinuxos.rb +12 -3
- data/lib/oxidized/model/fortios.rb +2 -1
- data/lib/oxidized/model/gaiaos.rb +4 -4
- data/lib/oxidized/model/ios.rb +15 -5
- data/lib/oxidized/model/ironware.rb +1 -1
- data/lib/oxidized/model/junos.rb +4 -0
- data/lib/oxidized/model/linksyssrw.rb +3 -3
- data/lib/oxidized/model/mlnxos.rb +14 -7
- data/lib/oxidized/model/model.rb +4 -3
- data/lib/oxidized/model/netgear.rb +2 -0
- data/lib/oxidized/model/nsxdfw.rb +2 -1
- data/lib/oxidized/model/nsxfirewall.rb +2 -1
- data/lib/oxidized/model/nxos.rb +2 -2
- data/lib/oxidized/model/openwrt.rb +6 -6
- data/lib/oxidized/model/procurve.rb +3 -1
- data/lib/oxidized/model/qtech.rb +3 -1
- data/lib/oxidized/model/quantaos.rb +8 -6
- data/lib/oxidized/model/routeros.rb +3 -2
- data/lib/oxidized/model/saos10.rb +38 -0
- data/lib/oxidized/model/sixwind.rb +28 -0
- data/lib/oxidized/model/sonicos.rb +1 -1
- data/lib/oxidized/model/supermicro.rb +1 -1
- data/lib/oxidized/model/timos.rb +1 -1
- data/lib/oxidized/model/tmos.rb +1 -0
- data/lib/oxidized/model/tnsr.rb +53 -0
- data/lib/oxidized/model/trango.rb +3 -1
- data/lib/oxidized/model/unifiap.rb +7 -5
- data/lib/oxidized/model/vrp.rb +3 -1
- data/lib/oxidized/model/xos.rb +3 -1
- data/lib/oxidized/model/zhoneolt.rb +3 -1
- data/lib/oxidized/model/zynos.rb +3 -3
- data/lib/oxidized/node.rb +44 -27
- data/lib/oxidized/nodes.rb +8 -4
- data/lib/oxidized/output/file.rb +28 -0
- data/lib/oxidized/output/git.rb +66 -9
- data/lib/oxidized/output/gitcrypt.rb +15 -13
- data/lib/oxidized/output/http.rb +5 -4
- data/lib/oxidized/output/output.rb +14 -0
- data/lib/oxidized/source/http.rb +4 -2
- data/lib/oxidized/version.rb +2 -2
- data/lib/oxidized/worker.rb +11 -8
- data/lib/oxidized.rb +3 -24
- data/oxidized.gemspec +8 -5
- metadata +54 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c03871264e842280577898104fee04193865836f6a36f9e271fc899723c0490
|
4
|
+
data.tar.gz: f63f80d3220f6112f5e20955d7f519628d86a358502b907ebe196ad85126fdc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f2a29dd10a0ecdfd43a5b4607e237a778ad7776d017d0c09f6cbe35bb01d2a20b1eefe733a995630355346b876ec0c15a504e72f6200a2362b5597da01ca0cf
|
7
|
+
data.tar.gz: 5030d36380278ad562d7242d090dcd12b73572b0c97d1ac9f0d6b654a3f530349923b8d83561fc2ccd2f7b68d1b4b503e0ba405a72589ad9bd916f50b74e7e8c
|
@@ -33,10 +33,13 @@ If applicable, add logs to help explain your problem.
|
|
33
33
|
```
|
34
34
|
|
35
35
|
**Running environment (please complete the following information):**
|
36
|
-
<!-- complete the following information and add further details if needed
|
36
|
+
<!-- complete the following information and add further details if needed.
|
37
|
+
Always test the latest version of oxidized -->
|
37
38
|
- OS: [e.g. Debian Bookworm, official container version xxx, ...]
|
38
39
|
- oxidized version: [e.g. 0.32.2]
|
39
40
|
- oxidized-web version: [e.g. 0.15.1, if applicable]
|
41
|
+
- Manufacturer model an software version:
|
42
|
+
- oxidized model name:
|
40
43
|
|
41
44
|
**Additional context**
|
42
45
|
Add any other context about the problem here.
|
@@ -26,10 +26,13 @@ If applicable, add logs to help explain your problem.
|
|
26
26
|
```
|
27
27
|
|
28
28
|
**Running environment (please complete the following information):**
|
29
|
-
<!-- complete the following information and add further details if needed
|
29
|
+
<!-- complete the following information and add further details if needed.
|
30
|
+
Always test the latest version of oxidized -->
|
30
31
|
- OS: [e.g. Debian Bookworm, official container version xxx, ...]
|
31
32
|
- oxidized version: [e.g. 0.32.2]
|
32
33
|
- oxidized-web version: [e.g. 0.15.1, if applicable]
|
34
|
+
- Manufacturer model an software version:
|
35
|
+
- oxidized model name:
|
33
36
|
|
34
37
|
**Additional context**
|
35
38
|
Add any other context about the problem here.
|
data/.github/workflows/ruby.yml
CHANGED
@@ -19,8 +19,10 @@ jobs:
|
|
19
19
|
runs-on: ubuntu-latest
|
20
20
|
strategy:
|
21
21
|
matrix:
|
22
|
-
ruby-version: ['3.1', '3.2', '3.3', '3.4'
|
23
|
-
|
22
|
+
ruby-version: ['3.1', '3.2', '3.3', '3.4']
|
23
|
+
# ruby-head disabled because of problem with bundler (2025-06-27)
|
24
|
+
# ruby-version: ['3.1', '3.2', '3.3', '3.4', 'ruby-head']
|
25
|
+
# continue-on-error: ${{ matrix.ruby-version == 'ruby-head' }}
|
24
26
|
|
25
27
|
steps:
|
26
28
|
- uses: actions/checkout@v4
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -14,6 +14,8 @@ AllCops:
|
|
14
14
|
Gemspec/DevelopmentDependencies:
|
15
15
|
EnforcedStyle: gemspec
|
16
16
|
|
17
|
+
# We prefer to use ”” by default and use ’’ to signal that interpolation is
|
18
|
+
# intentionally turned off, but we don't enforce it.
|
17
19
|
Style/StringLiterals:
|
18
20
|
Enabled: false
|
19
21
|
|
@@ -21,7 +23,13 @@ Style/FrozenStringLiteralComment:
|
|
21
23
|
Enabled: false
|
22
24
|
|
23
25
|
Layout/LineLength:
|
24
|
-
Enabled:
|
26
|
+
Enabled: true
|
27
|
+
IgnoreCopDirectives: false
|
28
|
+
Max: 120
|
29
|
+
# Too much models have long lines, which is unsafe to reduce without
|
30
|
+
# having an existing model unit test.
|
31
|
+
Exclude:
|
32
|
+
- lib/oxidized/model/*.rb
|
25
33
|
|
26
34
|
# We do not enforce the cop in the models as it would not work with the
|
27
35
|
# DSL style of the models
|
@@ -44,6 +52,7 @@ Layout/HashAlignment:
|
|
44
52
|
EnforcedHashRocketStyle: table
|
45
53
|
EnforcedColonStyle: table
|
46
54
|
|
55
|
+
# Explicitly allow the use of "not"
|
47
56
|
Style/Not:
|
48
57
|
Enabled: false
|
49
58
|
|
@@ -51,6 +60,9 @@ Style/Not:
|
|
51
60
|
Style/CommandLiteral:
|
52
61
|
EnforcedStyle: percent_x
|
53
62
|
|
63
|
+
Style/ConditionalAssignment:
|
64
|
+
Enabled: false
|
65
|
+
|
54
66
|
Style/FormatString:
|
55
67
|
EnforcedStyle: percent
|
56
68
|
|
@@ -73,9 +85,11 @@ Style/RegexpLiteral:
|
|
73
85
|
EnforcedStyle: slashes
|
74
86
|
AllowInnerSlashes: true
|
75
87
|
|
88
|
+
# Explicitly allow the use of rescue as a Modifier
|
76
89
|
Style/RescueModifier:
|
77
90
|
Enabled: false
|
78
91
|
|
92
|
+
# Intentionally left deactivated as used in the models
|
79
93
|
Style/SymbolProc:
|
80
94
|
Enabled: false
|
81
95
|
|
@@ -83,19 +97,22 @@ Style/Documentation:
|
|
83
97
|
Enabled: false
|
84
98
|
|
85
99
|
Style/ParallelAssignment:
|
86
|
-
Enabled:
|
100
|
+
Enabled: true
|
87
101
|
|
88
102
|
Metrics/MethodLength:
|
89
103
|
Max: 50
|
90
104
|
|
91
105
|
Metrics/AbcSize:
|
92
|
-
|
106
|
+
Enabled: false
|
93
107
|
|
94
108
|
Metrics/ClassLength:
|
95
|
-
|
109
|
+
Enabled: false
|
110
|
+
|
111
|
+
Metrics/PerceivedComplexity:
|
112
|
+
Enabled: false
|
96
113
|
|
97
|
-
|
98
|
-
|
114
|
+
Metrics/CyclomaticComplexity:
|
115
|
+
Enabled: false
|
99
116
|
|
100
117
|
# The BlockLength metric does not apply to unit tests. They are in nature
|
101
118
|
# long and not very pretty
|
@@ -107,5 +124,11 @@ Metrics/BlockLength:
|
|
107
124
|
Metrics/ParameterLists:
|
108
125
|
Max: 6
|
109
126
|
|
127
|
+
# Used in the models
|
110
128
|
Lint/EmptyBlock:
|
111
129
|
Enabled: false
|
130
|
+
|
131
|
+
# Disable the cop as string concatenation is widely used in oxidized
|
132
|
+
Style/StringConcatenation:
|
133
|
+
Enabled: false
|
134
|
+
|
data/.rubocop_todo.yml
CHANGED
@@ -1,32 +1,12 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2025-
|
3
|
+
# on 2025-07-15 08:50:44 UTC using RuboCop version 1.78.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
10
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
11
|
-
Metrics/AbcSize:
|
12
|
-
Enabled: false
|
13
|
-
|
14
|
-
# Offense count: 19
|
15
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
16
|
-
Metrics/CyclomaticComplexity:
|
17
|
-
Max: 12
|
18
|
-
|
19
|
-
# Offense count: 16
|
20
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
21
|
-
Metrics/PerceivedComplexity:
|
22
|
-
Max: 12
|
23
|
-
|
24
|
-
# Offense count: 2
|
25
|
-
Rake/DuplicateTask:
|
26
|
-
Exclude:
|
27
|
-
- 'Rakefile'
|
28
|
-
|
29
|
-
# Offense count: 2
|
9
|
+
# Offense count: 1
|
30
10
|
Style/ClassVars:
|
31
11
|
Exclude:
|
32
12
|
- 'lib/oxidized.rb'
|
@@ -39,20 +19,7 @@ Style/DoubleNegation:
|
|
39
19
|
Exclude:
|
40
20
|
- 'lib/oxidized/hook/exec.rb'
|
41
21
|
|
42
|
-
# Offense count: 3
|
43
|
-
Style/OpenStructUse:
|
44
|
-
Exclude:
|
45
|
-
- 'lib/oxidized/hook.rb'
|
46
|
-
- 'lib/oxidized/node.rb'
|
47
|
-
- 'spec/hook/githubrepo_spec.rb'
|
48
|
-
|
49
22
|
# Offense count: 33
|
50
23
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
51
24
|
Style/SlicingWithRange:
|
52
25
|
Enabled: false
|
53
|
-
|
54
|
-
# Offense count: 99
|
55
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
56
|
-
# Configuration parameters: Mode.
|
57
|
-
Style/StringConcatenation:
|
58
|
-
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,54 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
6
6
|
|
7
|
+
## [0.34.0 - 2025-07-15]
|
8
|
+
:warning: This release introduces a [new logging system](docs/Configuration.md#logging),
|
9
|
+
based on [semantic logger](https://logger.rocketjob.io/). The old configuration
|
10
|
+
(`log`, `syslog`) is still supported but obsolete and will be removed in a
|
11
|
+
future release, so be sure to migrate your configureation.
|
12
|
+
|
13
|
+
### Added
|
14
|
+
- add iosxr support to SyslogMonitor (@deesel)
|
15
|
+
- add junos: support show chassis cluster when SRX series (@shigechika)
|
16
|
+
- add nxos: support for complete hardware inventory (@garryshtern)
|
17
|
+
- ssh: support 'newline "string"' cfg block method to allow defining \r\n newline (@ytti)
|
18
|
+
- model for Netgate TNSR (@Vantomas)
|
19
|
+
- efos: New model for Brocade Enhanced Fabric OS. Fixes #3477 (@sorano, @cetjcm, @robertcheramy)
|
20
|
+
- output/file, output/git: clean node configurations which are not listed in the
|
21
|
+
source anymore. Fixes: #1805 (@robertcheramy)
|
22
|
+
- sixwind: New model to support 6WIND Virtual Service Router (@hcaldicott)
|
23
|
+
- model for saos10 (@penfold1972)
|
24
|
+
|
25
|
+
### Changed
|
26
|
+
- remove uri in commit-archive location for EdgeOS. Fixed #3525 (@systeembeheerder)
|
27
|
+
- acos: remove free storage amount from show version. Fixes #3492 (@991jo)
|
28
|
+
- Housekeeping in the code: Maximal line length: 120 char + Rubocop fixes (@robertcheramy)
|
29
|
+
- spec/model/data uses # instead of : as a separator in the filename, so we can
|
30
|
+
git clone under Windows. Fixes: #3481 (@robertcheramy)
|
31
|
+
- logging: rework of the logging system, using Semantic Logger (@robertcheramy)
|
32
|
+
|
33
|
+
### Fixed
|
34
|
+
- nxos: ignore bootflash size and permission errors (@rouven0)
|
35
|
+
- githubrepo: explicitly tell when Rugged isn't installed with ssh support (@robertcheramy)
|
36
|
+
- ironware: mask temperatures with more than two digits (@merelissdgr)
|
37
|
+
- add content-type header for PUT request in rest client (@deesel)
|
38
|
+
- docker: do not remove git. Fixes #3482 (@robertcheramy)
|
39
|
+
- awplus: fix skip password when enable=true (@shigechika)
|
40
|
+
- aosw: fix secret parsing (@rouven0)
|
41
|
+
- mlnxos: handle ANSI-ESC codes and pager requests. The prompt has been
|
42
|
+
reengineered, open an issue if you experience timeouts. Fixes #3469 (@robertcheramy)
|
43
|
+
- Update installation instructions on Rocky Linux 9. Fixes #3368 (@robertcheramy)
|
44
|
+
- awplus: fix enable password when supplied (@sgsimpson)
|
45
|
+
- Fix CodeQL scanning alerts on regular expressions (Issue #3513) in node.rb (alert 40),
|
46
|
+
asa (alerts 5 and 6), sonicos (4, 11), quantaos (9, 10), eltex (7), zynos (18, 19),
|
47
|
+
AricentISS (15) and aosw (36)
|
48
|
+
- fabricos: remove power supply input voltage from `chassisShow` output (@hops)
|
49
|
+
- netgear: include running-config in config output (@bradleywehmeier)
|
50
|
+
- tmos: remove deprecated secrets (@rouven0)
|
51
|
+
- log an error when no suitable input is found for a node. Fixes: #3346 (@robertcheramy)
|
52
|
+
- firelinuxos: fix timeout on syntax error. Fixes #3393, #3502 (@robertcheramy)
|
53
|
+
|
54
|
+
|
7
55
|
## [0.33.0 - 2025-03-26]
|
8
56
|
This release changes the way to configure oxidized-web. The old `rest`
|
9
57
|
configuration is still supported but deprecated. The new configuration works
|
@@ -38,6 +86,7 @@ so be sure to update to the latest version.
|
|
38
86
|
- srosmd: add ignore regex for 64-bit system uptime (@emiliaaah)
|
39
87
|
- removed some rubocop warnings (@robertcheramy)
|
40
88
|
|
89
|
+
|
41
90
|
## [0.32.2 – 2025-02-27]
|
42
91
|
This patch release mainly fixes the docker building process, wich resulted in
|
43
92
|
0.32.1 not beeing built.
|
data/CONTRIBUTING.md
CHANGED
@@ -170,10 +170,17 @@ git push -u origin 1234-your-branch-name
|
|
170
170
|
You can push as often as you wish. If you already opened a pull request, your pushed commits will automatically get updated there.
|
171
171
|
|
172
172
|
### Open a pull request
|
173
|
-
Go to your github repository, and github will propose to create a pull request
|
173
|
+
Go to your github repository, and github will propose to create a pull request
|
174
|
+
and will guide you.
|
174
175
|
|
175
|
-
We are happy that you are contributing to Oxidized. If something is not as it
|
176
|
-
will probably ask you to change it when reviewing the
|
176
|
+
We are happy that you are contributing to Oxidized. If something is not as it
|
177
|
+
should be, a maintainer will probably ask you to change it when reviewing the
|
178
|
+
pull request. And if your pull request breaks something, this can be fixed, so
|
179
|
+
don't be shy, submit your code ;-)
|
180
|
+
|
181
|
+
Note: if the github CI fail on your pull request, fix the problems.
|
182
|
+
A pull request with failed CI won't be merged into master, so maintainers may
|
183
|
+
only review pull requests that have passed the CIs.
|
177
184
|
|
178
185
|
### Delete the branch from your repository
|
179
186
|
When the pull request has been merged into main, github will ask if you want to delete your branch. Clean up and delete it, so that you can keep your fork clean and ready for new contributions.
|
data/Dockerfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
FROM docker.io/phusion/baseimage:noble-1.0.
|
1
|
+
FROM docker.io/phusion/baseimage:noble-1.0.2
|
2
2
|
|
3
3
|
ENV DEBIAN_FRONTEND=noninteractive
|
4
4
|
|
@@ -32,7 +32,7 @@ COPY extra/update-ca-certificates.runit /etc/service/update-ca-certificates/run
|
|
32
32
|
RUN apt-get -qy update \
|
33
33
|
&& apt-get -qy upgrade \
|
34
34
|
&& apt-get -qy --no-install-recommends install ruby \
|
35
|
-
# Build process of oxidized from git
|
35
|
+
# Build process of oxidized from git and git-tools in the container
|
36
36
|
git \
|
37
37
|
# Allow git send-email from docker image
|
38
38
|
git-email libmailtools-perl \
|
@@ -72,7 +72,7 @@ WORKDIR /tmp/oxidized
|
|
72
72
|
# Install gems which needs a build environment
|
73
73
|
RUN apt-get -qy update && \
|
74
74
|
apt-get -qy install --no-install-recommends \
|
75
|
-
build-essential
|
75
|
+
build-essential ruby-dev && \
|
76
76
|
##### X25519 (a.k.a. Curve25519) Elliptic Curve Diffie-Hellman
|
77
77
|
gem install x25519 && \
|
78
78
|
##### build & install oxidized from the working repository
|
@@ -80,7 +80,7 @@ RUN apt-get -qy update && \
|
|
80
80
|
git fetch --unshallow || true && \
|
81
81
|
rake install && \
|
82
82
|
# remove the packages we do not need.
|
83
|
-
apt-get -qy remove build-essential
|
83
|
+
apt-get -qy remove build-essential ruby-dev && \
|
84
84
|
apt-get -qy autoremove && \
|
85
85
|
apt-get clean && \
|
86
86
|
rm -rf /var/lib/apt/lists/*
|
data/README.md
CHANGED
@@ -31,11 +31,10 @@ Check out the [Oxidized TREX 2014 presentation](http://youtu.be/kBQ_CTUuqeU?t=3h
|
|
31
31
|
1. [Supported OS Types](docs/Supported-OS-Types.md)
|
32
32
|
2. [Installation](#installation)
|
33
33
|
* [Debian and Ubuntu](#debian-and-ubuntu)
|
34
|
-
* [
|
34
|
+
* [Rocky Linux, Red Hat Enterprise Linux](#rocky-linux-red-hat-enterprise-linux)
|
35
35
|
* [FreeBSD](#freebsd)
|
36
36
|
* [Build from Git](#build-from-git)
|
37
37
|
* [Docker & Podman](docs/Docker.md)
|
38
|
-
* [Installing Ruby 2.3 using RVM](#installing-ruby-23-using-rvm)
|
39
38
|
3. [Initial Configuration](#configuration)
|
40
39
|
4. [Configuration](docs/Configuration.md)
|
41
40
|
* [Debugging](docs/Configuration.md#debugging)
|
@@ -85,58 +84,80 @@ add-apt-repository universe
|
|
85
84
|
Install the dependencies:
|
86
85
|
|
87
86
|
```shell
|
88
|
-
apt
|
87
|
+
apt install ruby ruby-dev libsqlite3-dev libssl-dev pkg-config cmake libssh2-1-dev libicu-dev zlib1g-dev g++ libyaml-dev
|
89
88
|
```
|
90
89
|
|
91
|
-
Finally, install
|
90
|
+
Finally, install Oxidized:
|
92
91
|
|
93
92
|
```shell
|
94
93
|
gem install oxidized
|
95
|
-
gem install oxidized-script oxidized-web # If you don't install oxidized-web, ensure "rest" is removed from your Oxidized config.
|
96
94
|
```
|
97
95
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
```
|
96
|
+
You can also install one or both of the optional gems. They are not required
|
97
|
+
to run Oxidized:
|
98
|
+
```shell
|
99
|
+
gem install oxidized-web # Web interface and rest API
|
100
|
+
gem install oxidized-script # Script-based input/output extensions
|
101
|
+
```
|
104
102
|
|
105
|
-
|
103
|
+
### Rocky Linux, Red Hat Enterprise Linux
|
104
|
+
These instructions has been verified on Rocky Linux 9.3 and Fedora.
|
106
105
|
|
106
|
+
On Rocky Linux 9, you need to install/enable EPEL, CRB and Ruby 3.1:
|
107
107
|
```shell
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
rvm requirements run
|
112
|
-
rvm install 3.1
|
113
|
-
rvm use 3.1
|
108
|
+
dnf install epel-release
|
109
|
+
dnf config-manager --set-enabled crb
|
110
|
+
dnf module enable ruby:3.1
|
114
111
|
```
|
115
112
|
|
116
|
-
|
117
|
-
```
|
113
|
+
Then you need the required packages for oxidized:
|
114
|
+
```shell
|
115
|
+
dnf -y install ruby ruby-devel sqlite-devel openssl-devel pkgconf-pkg-config cmake libssh-devel libicu-devel zlib-devel gcc-c++ libyaml-devel which
|
116
|
+
```
|
118
117
|
|
119
|
-
|
120
|
-
```gem install oxidized oxidized-web```
|
118
|
+
Finally, install Oxidized:
|
121
119
|
|
122
|
-
|
123
|
-
|
120
|
+
```shell
|
121
|
+
gem install oxidized
|
122
|
+
```
|
124
123
|
|
125
|
-
You can
|
126
|
-
|
127
|
-
|
124
|
+
You can also install one or both of the optional gems. They are not required
|
125
|
+
to run Oxidized:
|
126
|
+
```shell
|
127
|
+
gem install oxidized-web # Web interface and rest API
|
128
|
+
gem install oxidized-script # Script-based input/output extensions
|
129
|
+
```
|
128
130
|
|
129
131
|
### FreeBSD
|
132
|
+
These installation instructions have been tested on FreeBSD 14.2, but
|
133
|
+
oxidized itself has not been tested on it.
|
134
|
+
|
135
|
+
First install ruby and rubyXX-gems (Find out the name of the package with `pkg search gems`):
|
136
|
+
```shell
|
137
|
+
pkg instal ruby
|
138
|
+
pkg instal ruby32-gems
|
139
|
+
```
|
140
|
+
|
141
|
+
Then install the dependencies of oxidized an oxidized-web:
|
142
|
+
```shell
|
143
|
+
pkg install ruby ruby-gems git sqlite3 libssh2 cmake pkgconf gmake
|
144
|
+
pkg install libyaml icu # Dependencies for oxidized-web
|
145
|
+
```
|
130
146
|
|
131
|
-
|
147
|
+
Finally, install Oxidized:
|
132
148
|
|
133
149
|
```shell
|
134
|
-
pkg install cmake pkgconf
|
135
150
|
gem install oxidized
|
136
|
-
gem install oxidized-script oxidized-web
|
137
151
|
```
|
138
152
|
|
139
|
-
|
153
|
+
You can also install one or both of the optional gems. They are not required
|
154
|
+
to run Oxidized:
|
155
|
+
```shell
|
156
|
+
gem install oxidized-web # Web interface and rest API
|
157
|
+
gem install oxidized-script # Script-based input/output extensions
|
158
|
+
```
|
159
|
+
|
160
|
+
Oxidized is also available via [FreeBSD ports](https://ports.freebsd.org/cgi/ports.cgi?query=oxidized):
|
140
161
|
|
141
162
|
```shell
|
142
163
|
pkg install rubygem-oxidized rubygem-oxidized-script rubygem-oxidized-web
|
@@ -154,30 +175,6 @@ rake install
|
|
154
175
|
### Running with Docker or Podman
|
155
176
|
See [docs/Docker.md](docs/Docker.md)
|
156
177
|
|
157
|
-
### Installing Ruby 2.3 using RVM
|
158
|
-
|
159
|
-
Install Ruby 2.3 build dependencies
|
160
|
-
|
161
|
-
```shell
|
162
|
-
yum install curl gcc-c++ patch readline readline-devel zlib zlib-devel
|
163
|
-
yum install libyaml-devel libffi-devel openssl-devel make cmake
|
164
|
-
yum install bzip2 autoconf automake libtool bison iconv-devel libssh2-devel libicu-devel
|
165
|
-
```
|
166
|
-
|
167
|
-
Install RVM
|
168
|
-
|
169
|
-
```shell
|
170
|
-
curl -L get.rvm.io | bash -s stable
|
171
|
-
```
|
172
|
-
|
173
|
-
Setup RVM environment and compile and install Ruby 2.3 and set it as default
|
174
|
-
|
175
|
-
```shell
|
176
|
-
source /etc/profile.d/rvm.sh
|
177
|
-
rvm install 2.3
|
178
|
-
rvm use --default 2.3
|
179
|
-
```
|
180
|
-
|
181
178
|
## Configuration
|
182
179
|
|
183
180
|
Oxidized configuration is in YAML format. Configuration files are subsequently sourced from `/etc/oxidized/config` then `~/.config/oxidized/config`. The hashes will be merged, this might be useful for storing source information in a system wide file and user specific configuration in the home directory (to only include a staff specific username and password). Eg. if many users are using `oxs`, see [Oxidized::Script](https://github.com/ytti/oxidized-script).
|
data/Rakefile
CHANGED
@@ -10,7 +10,6 @@ begin
|
|
10
10
|
require 'rubocop/rake_task'
|
11
11
|
|
12
12
|
RuboCop::RakeTask.new
|
13
|
-
task(:default).prerequisites << task(:rubocop)
|
14
13
|
rescue LoadError
|
15
14
|
task :rubocop do
|
16
15
|
puts 'Install rubocop to run its rake tasks'
|
@@ -90,7 +89,7 @@ end
|
|
90
89
|
|
91
90
|
desc 'Build the container image with docker or podman'
|
92
91
|
task :build_container do
|
93
|
-
branch_name = %x(git rev-parse --abbrev-ref HEAD).chop
|
92
|
+
branch_name = %x(git rev-parse --abbrev-ref HEAD).chop.gsub '/', '_'
|
94
93
|
sha_hash = %x(git rev-parse --short HEAD).chop
|
95
94
|
image_tag = "#{branch_name}-#{sha_hash}"
|
96
95
|
|
@@ -110,4 +109,4 @@ task :build_container do
|
|
110
109
|
end
|
111
110
|
end
|
112
111
|
|
113
|
-
task default:
|
112
|
+
task default: %i[rubocop test]
|
data/docs/Configuration.md
CHANGED
@@ -501,3 +501,100 @@ You can use some environment variables to change default root directories values
|
|
501
501
|
|
502
502
|
* `OXIDIZED_HOME` may be used to set oxidized configuration directory, which defaults to `~/.config/oxidized`
|
503
503
|
* `OXIDIZED_LOGS` may be used to set oxidzied logs and crash directories root, which default to `~/.config/oxidized`
|
504
|
+
|
505
|
+
## Logging
|
506
|
+
Oxidized supports parallel logging to different systems (appenders). The
|
507
|
+
following appenders are currently supported:
|
508
|
+
- `stderr`: log to standard error (this is the default)
|
509
|
+
- `stdout`: log to standard output
|
510
|
+
- `file`: log to a file
|
511
|
+
- `syslog`: log to syslog
|
512
|
+
|
513
|
+
> `stderr` and `stdout` are mutually exclusive and will produce a warning if used
|
514
|
+
> simultaneously.
|
515
|
+
|
516
|
+
> Note: `syslog` currently produces two timestamps because of an issue in
|
517
|
+
> [Sematic Logger](https://github.com/reidmorrison/semantic_logger/issues/316).
|
518
|
+
|
519
|
+
> You can configure as many file appenders as you wish.
|
520
|
+
|
521
|
+
You can set a log level globally and/or for each appender.
|
522
|
+
- The global log level will limit which log messages are accepted, depending
|
523
|
+
on their level.
|
524
|
+
- The default global log level is `:info`.
|
525
|
+
- If you set `debug: true` in the configuration, the global log level will be
|
526
|
+
forced to `:debug`.
|
527
|
+
- The appender log level limits which log messages are displayed by the
|
528
|
+
appender, depending on their level.
|
529
|
+
- The default is `:trace`.
|
530
|
+
|
531
|
+
|
532
|
+
> Available log levels: `:trace`, `:debug`, `:info`, `:warn`,
|
533
|
+
> `:error` and `:fatal`
|
534
|
+
|
535
|
+
Here is a configuration example logging `:error` to syslog, `:warn` to stdout
|
536
|
+
and `:info` to `~/.config/oxidized/info.log`:
|
537
|
+
|
538
|
+
```yaml
|
539
|
+
logger:
|
540
|
+
# Default level
|
541
|
+
# level: :info
|
542
|
+
appenders:
|
543
|
+
- type: syslog
|
544
|
+
level: :error
|
545
|
+
- type: stdout
|
546
|
+
level: :warn
|
547
|
+
- type: file
|
548
|
+
# Default level is :trace, so we get the logs in the default level (:info)
|
549
|
+
file: ~/.config/oxidized/info.log
|
550
|
+
```
|
551
|
+
|
552
|
+
If you want to log :trace to a file and `:info` to stdout, you must set the
|
553
|
+
global log level to `:trace`, and limit the stdout appender to `:info`:
|
554
|
+
|
555
|
+
```yaml
|
556
|
+
logger:
|
557
|
+
level: :trace
|
558
|
+
appenders:
|
559
|
+
- type: stdout
|
560
|
+
level: :info
|
561
|
+
- type: file
|
562
|
+
file: ~/.config/oxidized/trace.log
|
563
|
+
```
|
564
|
+
|
565
|
+
### Change log level
|
566
|
+
You can change the global log level of oxidized by sending a SIGUSR2 to
|
567
|
+
the process:
|
568
|
+
```
|
569
|
+
kill -SIGUSR2 424242
|
570
|
+
```
|
571
|
+
It will rotate between the log levels and log a warning with the new level
|
572
|
+
(you won't see the warning when the log level is `:fatal` or `:error`):
|
573
|
+
```
|
574
|
+
2025-06-30 15:25:27.972881 W [109750:2640] SemanticLogger -- Changed global default log level to :warn
|
575
|
+
```
|
576
|
+
|
577
|
+
If you specified a log level for an appender, this log level won't be
|
578
|
+
changed.
|
579
|
+
|
580
|
+
> :warning: **Warning** This currently does not work when oxidized-web is used
|
581
|
+
> and will kill the whole oxidized application. This will be corrected in a
|
582
|
+
> future release of oxidized-web.
|
583
|
+
|
584
|
+
### Dump running threads
|
585
|
+
With the SIGTTIN signal, oxidized will log a backtrace for each of its threads.
|
586
|
+
```
|
587
|
+
kill -SIGTTIN 424242
|
588
|
+
```
|
589
|
+
|
590
|
+
The threads used to fetch the configs are named `Oxidized::Job 'hostname'`:
|
591
|
+
|
592
|
+
```
|
593
|
+
2025-06-30 15:32:22.293047 W [110549:2640 core.rb:76] Thread Dump -- Backtrace:
|
594
|
+
/home/xxx/oxidized/lib/oxidized/core.rb:76:in `sleep'
|
595
|
+
/home/xxx/oxidized/lib/oxidized/core.rb:76:in `block in run'
|
596
|
+
(...)
|
597
|
+
2025-06-30 15:32:22.293409 W [110549:Oxidized::Job 'host2' ssh.rb:127] Thread Dump -- Backtrace:
|
598
|
+
/home/xxx/oxidized/lib/oxidized/input/ssh.rb:127:in `sleep'
|
599
|
+
/home/xxx/oxidized/lib/oxidized/input/ssh.rb:127:in `block (2 levels) in expect'
|
600
|
+
```
|