Aruba Instant prompt problem
Hi,
I have a working Oxidized instance for ProCurve and other gear. I am trying to add the first of our Aruba Instant APs to it, version 6.4.2.6-4.1.3.4_57646 but I'm getting this error in the logfile:
W, [2017-01-11T11:47:25.389826 #22131] WARN -- : 10.1.0.41 raised Oxidized::PromptUndetect with msg "
ap1# not matching configured prompt (?-mix:^\([^)]+\) [#>])"
W, [2017-01-11T11:47:26.149089 #22131] WARN -- : ap1.example.org status no_connection, retry attempt 1
I have confirmed that I can ssh to the AP using the credentials I specified in router.db and run a command:
[oxidized@host oxidized]$ ssh admin@ap1
admin@ap1's password: [redacted]
ap1# show running-config
version 6.4.2.0-4.1.3
...etc.
Here's the line in router.db:
ap1.example.org:aosw:admin:s3cr3t
Here's my oxidized config:
username: manager
password: sup3rs3cret
model: procurve
interval: 600
log: ~/.config/oxidized/log
use_syslog: false
debug: false
threads: 30
timeout: 20
retries: 3
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
vars:
enable: ev3nmor3s3cret
remove_secret: true
rest: 0.0.0.0:8787
groups: {}
pid: /home/oxidized/.config/oxidized/pid
input:
default: ssh, telnet
debug: true
ssh:
secure: false
output:
default: file
file:
directory: /home/oxidized/deviceconfigs
source:
default: csv
csv:
file: /home/oxidized/.config/oxidized/router.db
delimiter: !ruby/regexp /:/
map:
name: 0
model: 1
username: 2
password: 3
vars_map:
enable: 4
model_map:
cisco: ios
juniper: junos
What am I doing wrong?
Thank you and apologies if this is answered elsewhere.
-- MB
The defined prompt in model expects to see the hostname inside (). Maybe it was made for different model than yours. You could try to change the prompt regexp and see if it's only thing broken.
Holy smokes, that worked! :D I edited /usr/local/share/gems/gems/oxidized-0.19.0/lib/oxidized/model/aosw.rb and changed
prompt /^([^)]+) [#>]/
to
prompt /[#>]/
and restarted oxidized, and, it's pulling the config now. AWESOME!! Thank you! :)
-- MB
The prompt you specified seems too relaxed, you may end up detecting prompt early and missing output. When ever you see # or >, anywhere in the string, you'll stop reading output, as you think you're at end-of-output.
Bit more robust prompt may be prudent. I'd also appreciate contribution back when we have prompt which works on both models.
Btw. you can use local models by copying model in ~/.config/oxidized/model/ directory, you may want to do this, so that you don't end-up with upstream model when you upgrade oxidized, but keep using your local version.