Hi, we have some switches for which Oxidized failed with the following error:
Line 136091: Aug 14 09:25:29 oxidized[2393395]: W, [2025-08-14T09:25:29.759785 #2393395 ] WARN – : X.Y.Z.W raised Oxidized::PromptUndetect with msg “unable to detect prompt: (?-mix:(^\r|\e[24;[0-9][hH])?([\w\s.-]+[#>] )($|(\e[24;[0-9][0-9]?[hH]){3}))”
X.Y.Z.W is the IP address of the switch
If I try to ssh (manually) to the switch I got the prompt and I can work on the switch:
hostname#
Any hints?
Many other switches works perfectly
Thanks
Andrea
The logical explanation would be that Oxidized does not support the device model in question. Since you did not specify which devices you are testing with I cannot verify. However, that would be a issue with Oxidized and not with LibreNMS.
Hello Andrea!
I recall having a similar error when I was first setting up my Oxidized server. It has to do with regex detecting what prompt is on your switch.
I eventually commented out the original prompt statement and just went with “prompt: #”
Hope this helps
Hi,
the device is a HP J9626A 2620-48 Switch, revision RA.15.16.0005, ROM RA.15.11
The strange is that some other device of the same model work.
The prompt is
Your previous successful login (as manager) was on 2025-08-15 20:46:55
** from x.y.z.w**
[HERE A LOT OF BLANK LINES]
somename_per_ms_11#
The regexp should be
(?-mix:(^\r|\e[24;[0-9][hH])?([\w\s.-]+[#>] )($|(\e[24;[0-9][0-9]?[hH]){3}))
and it seems to me that matches with the prompt.
Oxidized logs:
oxidized[151510]: D, [2025-08-15T21:44:34.275337 #151510 ] DEBUG – : lib/oxidized/input/ssh.rb: expecting [/(^\r|\e[24;[0-9][hH])?([\w\s.-]+[#>] )($|(\e[24;[0-9][0-9]?[hH]){3})/] at x.y.z.w
oxidized[151510]: D, [2025-08-15T21:44:35.587175 #151510 ] DEBUG – : lib/oxidized/input/cli.rb: Running post_login commands at x.y.z.w
oxidized[151510]: D, [2025-08-15T21:44:35.587304 #151510 ] DEBUG – : lib/oxidized/input/cli.rb: Running post_login command: “no page”, block: nil at x.y.z.w
oxidized[151510]: W, [2025-08-15T21:44:56.020573 #151510 ] WARN – : x.y.z.w raised Oxidized::PromptUndetect with msg “unable to detect prompt: (?-mix:(^\r|\e[24;[0-9][hH])?([\w\s.-]+[#>] )($|(\e[24;[0-9][0-9]?[hH]){3}))”
Googling I found this issue
opened 06:45PM - 16 Feb 17 UTC
closed 08:43PM - 27 Apr 18 UTC
I tried to add new 2530 switch to Oxidized today and noticed that it fails to fe… tch config from the switch. The switch has quite a new fw and older similar switches that I have are working fine. Also found a way to get some debug printing from [here](https://github.com/ytti/oxidized/issues/401) but didn't managed to solve this problem. Here the problem and sample debug output from one of the older switches.
New switch which does not work
```
D, [2017-02-16T17:32:28.563799 #14218] DEBUG -- : lib/oxidized/input/cli.rb: Running post_login commands at switch-new
D, [2017-02-16T17:32:28.563920 #14218] DEBUG -- : lib/oxidized/input/cli.rb: Running post_login command: "no page", block: nil at switch-new
D, [2017-02-16T17:32:28.563957 #14218] DEBUG -- : lib/oxidized/input/ssh.rb no page @ switch-new with expect: /^\r?([\w -]+\eE)?([\w.-]+# )$/
D, [2017-02-16T17:32:28.564110 #14218] DEBUG -- : lib/oxidized/input/ssh.rb: expecting [/^\r?([\w -]+\eE)?([\w.-]+# )$/] at switch-new
D, [2017-02-16T17:32:28.865361 #14218] DEBUG -- : shell_open: "\e[24;16Hno page\e[24;16H\e[?25h\e[24;23H\e[1;0H\e[1M\e[24;1H\e[1L\e[24;23H\e[24;1H\e[2K\e[24;1H\e[?25h\e[24;1H\e[1;24r\e[24;1H\e[1;24r\e[24;1H\e[24;1H\e[2K\e[24;1H\e[?25h\e[24;1H\e[24;1Hswitch-new# \e[24;1H\e[24;16H\e[24;1H\e[?25h\e[24;16H"
D, [2017-02-16T17:32:28.997173 #14218] DEBUG -- : lib/oxidized/worker.rb: 1 jobs running in parallel
D, [2017-02-16T17:32:29.997443 #14218] DEBUG -- : lib/oxidized/worker.rb: 1 jobs running in parallel
D, [2017-02-16T17:32:30.997666 #14218] DEBUG -- : lib/oxidized/worker.rb: 1 jobs running in parallel
...
...
...
D, [2017-02-16T17:32:47.001637 #14218] DEBUG -- : lib/oxidized/worker.rb: 1 jobs running in parallel
D, [2017-02-16T17:32:48.001967 #14218] DEBUG -- : lib/oxidized/worker.rb: 1 jobs running in parallel
W, [2017-02-16T17:32:48.564676 #14218] WARN -- : 10.10.10.10 raised Timeout::Error with msg "execution expired"
D, [2017-02-16T17:32:48.564767 #14218] DEBUG -- : lib/oxidized/node.rb: Oxidized::SSH failed for switch-new
```
Older one that is working
```
D, [2017-02-16T17:32:22.391569 #14218] DEBUG -- : lib/oxidized/input/cli.rb: Running post_login commands at switch-old
D, [2017-02-16T17:32:22.391713 #14218] DEBUG -- : lib/oxidized/input/cli.rb: Running post_login command: "no page", block: nil at switch-old
D, [2017-02-16T17:32:22.391789 #14218] DEBUG -- : lib/oxidized/input/ssh.rb no page @ switch-old with expect: /^\r?([\w -]+\eE)?([\w.-]+# )$/
D, [2017-02-16T17:32:22.392054 #14218] DEBUG -- : lib/oxidized/input/ssh.rb: expecting [/^\r?([\w -]+\eE)?([\w.-]+# )$/] at switch-old
D, [2017-02-16T17:32:22.693345 #14218] DEBUG -- : shell_open: "\e[24;29Hno page\e[24;29H\e[?25h\e[24;36H\e[24;0H\eE\e[24;1H\e[24;36H\e[24;1H\e[2K\e[24;1H\e[?25h\e[24;1H\e[1;24r\e[24;1H\e[1;24r\e[24;1H\e[24;1H\e[2K\e[24;1H\e[?25h\e[24;1H\e[24;1Hswitch-old# \e[24;1H\e[24;29H\e[24;1H\e[?25h\e[24;29H"
D, [2017-02-16T17:32:22.793848 #14218] DEBUG -- : lib/oxidized/model/model.rb Collecting commands' outputs
D, [2017-02-16T17:32:22.793972 #14218] DEBUG -- : lib/oxidized/model/model.rb Executing show version
```
It seems very similar to mine; I think the problem is that in these switches the firmware returns some strange characters for new line and Oxidized doesn’t recognize them!
Are there any workaround without upgrading the switch firmware?