PowerConnect Prompt Issue
We have a couple of PowerConnect blade server switches where the prompt isn't being detected.
Log message
raised Oxidized::PromptUndetect with msg "#015#012switchmodule> not matching configured prompt (?-mix:^([\w\s.@-]+[#>]\s?)$)"
System Description: Dell Ethernet Switch System Model ID: PCM6348 Machine Type: PowerConnect M6348
Curious, I guess you expect your prompt to be "switchmodule>"
But it looks like it saw "#15#012switchmodule>", you might want to try to add '#' in the bracket of the prompt, before '-'.
#15#012 isn't actually a part of the prompt though. I will try adjusting the prompt to include that.
You could try to set on debugging to store terminal session. Probably it pukes some trash sometimes and sometimes does not, unfortunately not too uncommon for the CLI implementation to be be crappy.
Funnily enough 015 is \r and 012 is \n, not sure if that is coincidence.
I don't think it is a coincidence. I tried adding # in there. but that didn't fix anything. It has to be a more implementation and they are sending newline characters odd.
raised Oxidized::PromptUndetect with msg "#015#012switchmodule> not matching configured prompt (?-mix:^([\w\s.@#-]+[#>]\s?)$)"
you could try adding \r? in the beginning of the regexp prompt
On 25 October 2015 at 00:11, etern4ever [email protected] wrote:
I don't think it is a coincidence. I tried adding # in there. but that didn't fix anything. It has to be a more implementation and they are sending newline characters odd.
raised Oxidized::PromptUndetect with msg "#15 https://github.com/ytti/oxidized/pull/15#012switchmodule> not matching configured prompt (?-mix:^([\w\s.@#-]+[#>]\s?)$)"
— Reply to this email directly or view it on GitHub https://github.com/ytti/oxidized/issues/228#issuecomment-150851764.
++ytti
Tried that.. it didn't work. Still digging into it. I am sure it has to do with newline characters. Just need a way to clean up the output from the device.
I have tried a lot of things. I still can't get it to detect prompt. Even if I change prompt to \S+. Very odd.
The crash log shows a CR LF on one line, then the prompt on the next.

Do you have input debug file, with session stores, I'd like to take a peek.
On 27 October 2015 at 15:21, etern4ever [email protected] wrote:
I have tried a lot of things. I still can't get it to detect prompt. Even if I change prompt to \S+. Very odd.
The crash log shows a CR LF on one line, then the prompt on the next. [image: 2015-10-27 08_20_01-photos] https://cloud.githubusercontent.com/assets/7612193/10759135/a0451e9c-7c83-11e5-867b-9e5651f016e2.png
— Reply to this email directly or view it on GitHub https://github.com/ytti/oxidized/issues/228#issuecomment-151492154.
++ytti
How do I enable this? Under input section in the config, I have debug: /tmp/oxidized_log but this doesn't appear to create the logs files as I would expect.
I think we may have changed it so that it creates logs always in your oxidized dir with name of the device, so it's really 'true' or 'false' kinda deal now.
I have the crash files (I believe this is what you want).
lib/oxidized/config.rb
Crash = File.join Root, 'crash'
lib/oxidized/input/ssh.rb
@log = File.open(Oxidized::Config::Crash + "-#{@node.ip}-ssh", 'w') if CFG.input.debug?
Whats your email? I will send it over.
I don't actually mean crash file, I mean the @log file.
My email is '[email protected]', thanks a bunch!
Sent over the log file. Hopefully that helps figure this out.
Have you had time to look over the log file?
Sorry, forgot this. Just reviewed and was bit disappointed that it wasn't full session log. Now I don't have full confidence that what ever tool was used to edit it, didn't take out special chars.
Anyhow for the the prompt seen, something super simple will work in the model.
This is what we have now. https://github.com/ytti/oxidized/blob/master/lib/oxidized/model/powerconnect.rb#L3
I think the 'space' part may make it very non-robust.
You could try something like: prompt /^[\w-]+>$/
It's simplest to match /your/ prompt, but shouldn't match much else. Unless there happens to be line some configuration line without indent which ends with >.
Also perhaps some model contributor has idea what issue you're having, @emjemj @MrRJ45 @skares @sid3windr
I changed the prompt to that and it still doesn't like it. Something is odd about these blade switches. These are the only devices I have problems detecting prompt on.
It's probably some other issue then. Can you arrange me an remote access to one of the devices? Perhaps lab box attached to a /31 router, so no privileged access anywhere?
This way I could try Oxidized on my own box against it to replicate the issue, and dig deeper.
Unfortunately, this isn't possible. These are at a customer site in a production environment (being blade server switches and all).
I might need to come up with an alternative way of getting these into oxidized.
I have the same issue with a PowerConnect switch. However, pretending its a cisco script netted me with something that looked like a config. I have merged the powerconnect and ios files and I'm finally able to see the config files on the web-interface.
Ooooh I know what it is. It's same issue we have in CiscoSMB
https://github.com/ytti/oxidized/blob/master/lib/oxidized/model/powerconnect.rb#L31
We define username/password prompt for 'ssh', so we're actually trying to login outside SSH auth process (Some kit actually do that).
Do some PowerConnect versions do that? So ssh auth is 'noauth' and you'll always login, but then get username+password prompt? If not, we can just remove :ssh there, and it'll work.