ArubaOS 8 issue
oxidized fails to fetch configuration from ArubaOS 8,
ArubaOS version : Aruba Operating System Software. ArubaOS (MODEL: Aruba7220-US), Version 8.5.0.4
logs :
Jun 05 22:37:47 oxidized-server oxidized[2114]: lib/oxidized/job.rb: Starting fetching process for node-wl1 at 2020
-06-06 02:37:47 UTC
Jun 05 22:37:47 oxidized-server oxidized[2114]: lib/oxidized/input/ssh.rb: Connecting to node-wl1
Jun 05 22:37:48 oxidized-server oxidized[2114]: lib/oxidized/input/ssh.rb: expecting [/^(\^M)?([\w\(:.@-]+(\)\s?[\^\*]
?\[?\w*\]?\s?)\*?[#>]\s?)$/] at node-wl1
Jun 05 22:37:49 oxidized-server oxidized[2114]: lib/oxidized/input/cli.rb: Running post_login commands at node-wl1
Jun 05 22:37:49 oxidized-server oxidized[2114]: lib/oxidized/input/cli.rb: Running post_login command: "no paging", bl
ock: nil at node-wl1
Jun 05 22:37:49 oxidized-server oxidized[2114]: lib/oxidized/input/ssh.rb no paging @ node-wl1 with expect: /^(\^M)
?([\w\(:.@-]+(\)\s?[\^\*]?\[?\w*\]?\s?)\*?[#>]\s?)$/
Jun 05 22:37:49 oxidized-server oxidized[2114]: lib/oxidized/input/ssh.rb: expecting [/^(\^M)?([\w\(:.@-]+(\)\s?[\^\*]
?\[?\w*\]?\s?)\*?[#>]\s?)$/] at node-wl1
Jun 05 22:38:09 oxidized-server oxidized[2114]: lib/oxidized/node.rb: Oxidized::SSH failed for node-wl1
Jun 05 22:38:09 oxidized-server oxidized[2114]: lib/oxidized/job.rb: Config fetched for node-wl1 at 2020-06-06 02:3
8:09 UTC
Jun 05 22:38:09 oxidized-server oxidized[2114]: wireless-controller/node-wl1 status no_connection, retries exhauste
d, giving up
ssh debug log for the node as seen in vim:
^M
(node-wl1) #no paging
^M(node-wl1) #
https://rubular.com/r/DHHXh79HedCi5t
^(^M)?([\w(:.@-]+()\s?[^*]?[?\w*]?\s?)*?[#>]\s?)$
regex updated to match aos8 for wireless controller and mobility master but seems to fail only after using cli no paging
Hello,
I can confirm this. Just like you I first modified the prompt regex to match AOS 8. But when I got the prompt to match it stops after no paging. Pretty sure I got it to continue to the next command if I added a \n to the no paging command in the aosw.rb file if that would help in troubleshooting. However after the next command, it stops again. Debug log for my node:
^M
(X-VPNC-7005-02) *#no paging
^M(X-VPNC-7005-02) *#
here is a workaround for the issue. **post_login "no paging\nshow version"**
change aosw.rb model file (oxidized/lib/oxidized/model/aosw.rb) to
cfg :ssh do
if vars :enable
post_login do
send "enable\n"
cmd vars(:enable)
end
end
post_login "no paging\nshow version"
pre_logout 'exit' if vars :enable
pre_logout 'exit'
@yoakim, did try adding \n after no paging such as "no paging\n" or ''no paging\n\n\n" but still didn't help.
Thanks for the workaround! Any idea why that works?
^M is typically the representation of carriage-return, and can be matched by including ^\r? at the beginning of the prompt regexp, rather than ^(^M)?
I m having exactly the same issue with oxidized stopping right after "no paging". Has anyone been able to fix this ? (dub-md-wlc001) #no paging (dub-md-wlc001) #
Hi! I had the same problem and i've solved as follows:
Backup your "aosw.rb" file; Edit your "aosw.rb" file: 1- If you Aruba prompt show:
*# So, edit the prompt regex: From:
prompt /^([\w\(:.@-]+(\)?\s?)[#>]\s?)$/To:prompt /^(\^M)?([\w\(:.@-]+(\)\s?[\^\*]?\[?\w*\]?\s?)\*?[#>]\s?)$/
If this is not your problem, just pass to step 2.
2- Edit "post_login" statements:
From: post_login 'no paging'
To: post_login "no paging\nencryp disable\nshow running"
And comment all others "post_login" lines:

I hope it helps.
Hello,
I've just finished troubleshooting of this because no workaround from this thread worked for me. I've changed prompt regex in "aosw.rb" file to: prompt /.*([\^\w\(:.@-]+(\)?\s\*?(\[.*\])?\s?)[#>]\s?)$/
It looks like Oxidized couldn't recognize beginning of the line character, which was showing as ^M (Control-M).
This your workaround is just one part of the possible solution. Paste your debug if you want, and we maybe solve it.
Hi, another example of a prompt not matching...
(hostname) [mynode] # not matching configured prompt (?-mix:^([\w\(:.@-]+(\)?\s?)[#>]\s?)$)"
I've modified my aosw.rb and restarted oxidized...do I have to do anything else to pick up the prompt change?
Hi, another example of a prompt not matching...
(hostname) [mynode] # not matching configured prompt (?-mix:^([\w\(:.@-]+(\)?\s?)[#>]\s?)$)"I've modified my aosw.rb and restarted oxidized...do I have to do anything else to pick up the prompt change?
Hello,
Try to change that regex in aosw.rb file to the one which I've posted above:
prompt /.*([\^\w\(:.@-]+(\)?\s\*?(\[.*\])?\s?)[#>]\s?)$/
Thanks jesusko, this is working..the issue was not your prompt it was my aosw.rb location...aparently it wasn't the one in /opt/oxidized/model/...it was located in /usr/local/lib/ruby/gems/2.4.0/gems/oxidized-0.28.0/lib/oxidized/model/
Thanks again! You rock!
