Comments (7)
The first line looks to be the version, so you're only missing running-config. Not sure why, but I'm guessing maybe 'cfg' is 'nil' here for some reason:
cmd 'show running-config' do |cfg|
cfg = cfg.each_line.to_a[3..-1]
cfg = cfg.reject { |line| line.match /^ntp clock-period / }.join
cfg.gsub! /^Current configuration : [^\n]\n/, ''
cfg.gsub! /^\ tunnel\ mpls\ traffic-eng\ bandwidth[^\n]\n_(
(?:\ [^\n]\n)_
tunnel\ mpls\ traffic-eng\ auto-bw)/mx, '\1'
cfg
end
Probably this returns nil, instead of the expected config string.
There aren't really good ways to debug the models, you can get full ssh and telnet session logs though, by setting:
input:
debug: input.log
For module development/debugging maybe easiest is to copy the model to your oxidized directory under 'model' directory (i.e. ~/.config/oxidized/model/ios.rb), if model is found there it is used, instead of the global/shipping definition, so you could add there your own debugging code.
Certainly
- model needs to be fixed
- we need better way to debug models, but i don't want solution which bloats the models themselves
from oxidized.
Seems like it doesn't run the 'enable' command.
from oxidized.
How does your config look with regarding 'enable'
from oxidized.
---
username: manager
password: S3cret
enable: S3cret
model: junos
interval: 3600
log: /home/sts/.config/oxidized/log
debug: true
threads: 30
timeout: 30
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 127.0.0.1:8888
vars: {}
groups: {}
remove_secret: false
input:
default: ssh
debug: /home/sts/.config/oxidized/input.log
ssh:
secure: true
output:
default: file
file:
directory: /home/sts/.config/oxidized/configs
source:
default: csv
csv:
file: /home/sts/.config/oxidized/router.db
delimiter: !ruby/regexp /:/
map:
name: 0
model: 1
username: 2
model_map:
cisco: ios
juniper: junos
from oxidized.
Try
vars:
enable: 'foof'
I don't think the old way is supported anymore. The vars is now used as it supports multiple levels (global, per-group, per-node)
from oxidized.
Yes that worked! Documentation should be updated regarding this (also include the debug tip!). Also an example for setting it per item would be cool. Thanks!
from oxidized.
Yeah documents leave lot to be desired right now.
from oxidized.
Related Issues (20)
- when 'use_max_threads' is true, and 'threads' is equal or higher than the nodes to query, oxidized enters an endless loop HOT 2
- Debugging custom model for Oxidized HOT 1
- ssh proxy connection problem HOT 2
- Hot to catch "node not found" via API? HOT 2
- RouterOS V7 new time based system comment HOT 1
- Fastiron Suggested Tweaks HOT 1
- Does not pull pfsense config HOT 2
- vyos: oxidized can't get config when logged in as non-local, non-privileged user HOT 3
- Oxidized web console doesn't show "Last Status" HOT 2
- SSH proxy failed backup until disconnect/timeout HOT 4
- No Connetion to HP Procurve 2620 HOT 6
- Extend model, crash oxidized HOT 2
- Rugged::NetworkError on RHEL9 HOT 1
- Git performance problems with large device count HOT 2
- Oxidized 0.29.1 with net-ssh >7.2 crashes when offered rsa-sha2-512 HOT 14
- Oxidized v.0.30.1 backup FortiGate config issue - only backup 70% devices HOT 32
- Can't run syslog.rb - cannot load such file -- asetus (LoadError)
- problem when you specify the ssh port
- Sonicos Model: '-' in name of device is not supported HOT 1
- fireeye ex sh run backup issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oxidized.