RouterConfigs Plugin

General discussion about Plugins for Cacti

Moderators: Moderators, Developers

Author
Message
cammpt
Posts: 12
Joined: Thu Aug 22, 2019 5:28 am

RouterConfigs Plugin

#1 Post by cammpt » Thu Aug 22, 2019 5:42 am

I have a problem with Routerconfigs - Device type - HP comware device. It work with Cisco and Nexus, but do not work with HP. Please help me with my debug:

[[email protected] tftpdata]# php /usr/share/cacti/plugins/routerconfigs/router-download.php --debug
2019/08/22 17:29:13 - RCONFIG NOTICE: Starting automatic backup
2019/08/22 17:29:13 - RCONFIG STATS: Backup now running since 2019-08-22 17:29:13
2019/08/22 17:29:13 - RCONFIG DEBUG: SQL: SELECT * FROM plugin_routerconfigs_devices WHERE enabled = 'on' AND (nextbackup <= 1566469753 OR nextbackup IS NULL)
2019/08/22 17:29:13 - RCONFIG DEBUG: Attempting download for vndc-iat6602-1a
2019/08/22 17:29:13 - RCONFIG DEBUG: Base64 decoded: a:3:{i:1003361463;i:365052854;s:8:"password";s:13:"(13: chars)";i:895429976;i:1310203824;}
2019/08/22 17:29:13 - RCONFIG DEBUG: Base64 decoded:
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 -> DEBUG: ssh has 'PHPSsh'
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 -> DEBUG: Attempting to use 'PHPSsh'
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: Creating SSH Server: 10.19.253.37, User: administrator, Password: (13 chars), Enablepw: (Not Set)
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: deviceType: {"id":"5","name":"Router HP","promptuser":"username:","promptpass":"password:","connecttype":"","configfile":"","copytftp":"backup startup-configuration to 10.19.203.31 vndc-iat6602-1a.cfg","version":"","confirm":"","sleep":"125000","timeout":"1","forceconfirm":"","checkendinconfig":"","anykey":""}
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: Setting timeout to 5 second(s)
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: Setting sleep time to 125000 microsecond(s)
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: okay: logged in...
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: Connected via SSH
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> NOTICE: Ensuring process is enabled
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: -->
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <--
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <--
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <-- ******************************************************************************
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <--
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <-- * Copyright (c) 2010-2017 Hewlett Packard Enterprise Development LP *
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <--
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <-- * Without the owner's prior written consent, *
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <--
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <-- * no decompiling or reverse-engineering shall be allowed. *
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <--
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <-- ******************************************************************************
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <--
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <--
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <--
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <--
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <--
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <-- <vndc-iat6602-1a>
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: Found Prompt (Normal)
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: Attempt 1 of 10 to find prompt
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> Process is now NOT enabled
2019/08/22 17:29:13 - RCONFIG ERROR: Failed to download 'vndc-iat6602-1a' to '/tftpdata/vndc-iat6602-1a' via 'ssh'
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: --> exit
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <--
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <--
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <-- <vndc-iat6602-1a>exit
2019/08/22 17:29:13 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: <--
2019/08/22 17:29:18 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: Timeout of 5 seconds has been reached
2019/08/22 17:29:19 - RCONFIG 10.19.253.37 (SSH) -> DEBUG: Checking for valid incoming file at /tftpdata/vndc-iat6602-1a
2019/08/22 17:29:19 - RCONFIG 10.19.253.37 (SSH) -> ERROR: Failed to find file at /tftpdata/vndc-iat6602-1a
2019/08/22 17:29:19 - RCONFIG NOTICE: Failed to download for vndc-iat6602-1a
2019/08/22 17:29:19 - RCONFIG WARNING: 0 Devices Backed Up, 1 Devices Failed, 5 Disabled (ignored) in 6 seconds
2019/08/22 17:29:19 - RCONFIG DEBUG: 0 devices backed up successfully.
2019/08/22 17:29:19 - RCONFIG DEBUG: 1 devices failed to backup.
2019/08/22 17:29:19 - RCONFIG DEBUG: 5 devices disabled from backup.
2019/08/22 17:29:19 - RCONFIG STATS: Time:5.63 Downloaded:0 Failed:1

netniV
Cacti Guru User
Posts: 2796
Joined: Sun Aug 27, 2017 12:05 am

Re: RouterConfigs Plugin

#2 Post by netniV » Thu Aug 22, 2019 7:03 am

Unfortunately, I don't have a HP Comware switch to play with so this is going to be guess work from me for now.

Looking at your log though, it's like part of it is missing. The "Process is now NOT enabled" message only comes after some other lines where it attempts to find the prompt being used etc. If you feel that that's too sensitive to post on here, can you email me the full log to [email protected]

cammpt
Posts: 12
Joined: Thu Aug 22, 2019 5:28 am

Re: RouterConfigs Plugin

#3 Post by cammpt » Thu Aug 22, 2019 9:46 pm

netniV wrote:
Thu Aug 22, 2019 7:03 am
Unfortunately, I don't have a HP Comware switch to play with so this is going to be guess work from me for now.

Looking at your log though, it's like part of it is missing. The "Process is now NOT enabled" message only comes after some other lines where it attempts to find the prompt being used etc. If you feel that that's too sensitive to post on here, can you email me the full log to [email protected]
Thx for your supporting, but that is full log, I do not see anything like you asked.
Attachments
debug-routerconfigs.JPG
This is debug on WebUI
debug-routerconfigs.JPG (71.58 KiB) Viewed 2035 times

netniV
Cacti Guru User
Posts: 2796
Joined: Sun Aug 27, 2017 12:05 am

Re: RouterConfigs Plugin

#4 Post by netniV » Fri Aug 23, 2019 2:16 pm

Ah, yeah, now I see, I think you've missed setting the enable command and as such, it can't actually attempt to enable, thus it reports back that it's not enabled.

netniV
Cacti Guru User
Posts: 2796
Joined: Sun Aug 27, 2017 12:05 am

Re: RouterConfigs Plugin

#5 Post by netniV » Fri Aug 23, 2019 2:32 pm

So I added an extra debug log to show when the command isn't set. You can try to download the latest version so you can see if what I suspect is true.

cammpt
Posts: 12
Joined: Thu Aug 22, 2019 5:28 am

Re: RouterConfigs Plugin

#6 Post by cammpt » Tue Aug 27, 2019 4:34 am

thx for your supporting,

i'm using Routerconfigs Plugin 1.5.1 and cacti 1.2.4. which one need update?

On HP Comware the Backup command don't need "enable"

netniV
Cacti Guru User
Posts: 2796
Joined: Sun Aug 27, 2017 12:05 am

Re: RouterConfigs Plugin

#7 Post by netniV » Tue Aug 27, 2019 7:32 am

update the routerconfigs with the latest development version.

cammpt
Posts: 12
Joined: Thu Aug 22, 2019 5:28 am

Re: RouterConfigs Plugin

#8 Post by cammpt » Wed Aug 28, 2019 4:06 am

Could you share the download link?

Thx!

cammpt
Posts: 12
Joined: Thu Aug 22, 2019 5:28 am

Re: RouterConfigs Plugin

#9 Post by cammpt » Wed Aug 28, 2019 4:59 am

I think your code detecting characters after login on device:

Cisco's characters is # so that working (ex: vndc-c9300-1a#copy run tftp://...)
HP's characters is > so that failed (ex: <vndc-iat6602-1a>backup startup to CactiServer)

could you develop this?

netniV
Cacti Guru User
Posts: 2796
Joined: Sun Aug 27, 2017 12:05 am

Re: RouterConfigs Plugin

#10 Post by netniV » Wed Aug 28, 2019 12:58 pm

Actually, cisco's have both. It depends on whether it's enabled or not. A lot of admins have auto-enable mode set so may only see the one style but there's always two and are on most routers.

Do you have the debug log from the latest version?

cammpt
Posts: 12
Joined: Thu Aug 22, 2019 5:28 am

Re: RouterConfigs Plugin

#11 Post by cammpt » Mon Sep 02, 2019 9:29 pm

could you share the routerconfigs latest version?


cammpt
Posts: 12
Joined: Thu Aug 22, 2019 5:28 am

Re: RouterConfigs Plugin

#13 Post by cammpt » Tue Sep 03, 2019 2:54 am

I have using lastest version (1.5.1). I have installed a month ago.

netniV
Cacti Guru User
Posts: 2796
Joined: Sun Aug 27, 2017 12:05 am

Re: RouterConfigs Plugin

#14 Post by netniV » Tue Sep 03, 2019 9:10 am

Was that after I said I'd updated it? If not, you'll need to get it again.

cammpt
Posts: 12
Joined: Thu Aug 22, 2019 5:28 am

Re: RouterConfigs Plugin

#15 Post by cammpt » Tue Sep 03, 2019 11:38 pm

thanks for your supporting,

How to update routerconfigs plugin? could you share step by step document or something like that?

Thx !

Post Reply