Code Monkey home page Code Monkey logo

rancid's People

Contributors

adschutz avatar haussli avatar rolandrosenfeld avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rancid's Issues

Mikrotik 'Ip neighbor print' parse procedure for routeros.pm

Hello! Thank You so much for supporting this wonderful project, I was wondering if it is possible to add ip neighbor print command parsing procedure which will store all ips, hostnames, models, firmwares etc. of connected device in a nice way in a common conf file? Or could You pleae at least point out some examples of parsing the output with ProcessHistory procedure? Thank's in advance!!

iox - 7.9.1 -- seconds not stable on license status

running cisco iox 7.9.1 on a 8808

seeing noise on with: show license status with the seconds for expires/deadline oscillating

example:

RP/0/RP0/CPU0:r29.labxtx03.us.bb#show license status | include "Expires:|Deadline:"
Thu Nov 23 22:36:07.952 UTC
  Registration Expires: Oct 09 2024 15:31:27 UTC
  Communication Deadline: Feb 08 2024 15:32:49 UTC

RP/0/RP0/CPU0:r29.labxtx03.us.bb#show license status | include "Expires:|Deadline:"
Thu Nov 23 22:36:11.100 UTC
  Registration Expires: Oct 09 2024 15:31:26 UTC
  Communication Deadline: Feb 08 2024 15:32:49 UTC

RP/0/RP0/CPU0:r29.labxtx03.us.bb#show license status | include "Expires:|Deadline:"
Thu Nov 23 22:36:43.909 UTC
  Registration Expires: Oct 09 2024 15:31:26 UTC
  Communication Deadline: Feb 08 2024 15:32:48 UTC

resulting in rancid noise such as:

  !   Virtual Account: DEFAULT
  !   Export-Controlled Functionality: ALLOWED
  !   Initial Registration: SUCCEEDED on Oct 10 2023 15:36:28 UTC
- !   Registration Expires: Oct 09 2024 15:31:26 UTC
+ !   Registration Expires: Oct 09 2024 15:31:27 UTC
  ! License Authorization:
  !     Failure reason: Fail to send out Call Home HTTP message
- !   Communication Deadline: Feb 08 2024 15:32:48 UTC
+ !   Communication Deadline: Feb 08 2024 15:32:49 UTC
  ! Export Authorization Key:
  !   Features Authorized:
  !     <none>

Mikrotik router OS version 7.1rc3 backup failed

Hi,

We have recently upgraded Mikrotik core routers to Mikrotik router OS version 7.1rc3.
After the upgrade, rancid Mikrotik backups stopped for Mikrotik router OS version 7.1rc3. Other routers are backing up, which are running on Mikrotik router OS version 6.x.

We are getting below errors logs,

missed cmd(s): all commands
: End of run not found

your help is greatly appreciated

ios.pm shows active B-channels on E1

Our Cisco 2851 ISR contains an E1 card.

It appears as follows:

!Slot 0/0: fru HWIC-2CE1T1-PRI
!Slot 0/0: type 2 port channelized and PRI T1/E1 HWIC
!Slot 0/0: hvers 0.0 rev D0
!Slot 0/0: part 73-10363-05, serial xxx

In "ShowContAll" the line's D channel appears as follows:

!Interface: Serial0/0/0:15, HDLC32

The problems now is that any B channel (Serial0/0/0:0-14, 16-31) that is up at polling time generates a diff.

There are too many diffs because of that. It's not interesting to know if B channels are up or not.

I will be proposing an enhancement to fix this.

tmpfile symlink vulnerability

As mentioned in https://lwn.net/Articles/250468/ and https://bugs.debian.org/496426 there may be a vulnerability when using tempfiles in /tmp.
In the rancid context the vulnerability isn't that grave, since rancid usually doesn't run as user root but as user rancid, but since rancid is some kind of backup, this may allow to attack your backup.

In the Debian package I fixed this vulnerability with the following patch: https://salsa.debian.org/debian/rancid/-/blob/master/debian/patches/06_tmp_security.patch
This uses mktemp(1) from the coreutils package to create a safe temp directory. In some situations it simply uses /var/lib/rancid (which is not permission 1777 but only accessible by user rancid) as an alternative implementation (not sure, whether I not always used mktemp, but this was 12 years ago...).

I'm not fully sure, what the best solution for upstream rancid package is, since I don't know whether mktemp can be considered to be available on every system (or how to integrate this into autoconf).

Since Debian requests maintainers to forward all Debian optimizations upstream, I'll open this issue here...

Greetings
Roland

Mikrotik 'export terse' Preferred

In bin/mtrancid, line 279, the command 'export terse' produces output that makes for cleaner diffs.

'export' produces multi-line commands where as 'export terse' produces every complete command as a single line.

It would be great if 'export terse' could be the default.

Ubiquiti devices seeing oscillating config change (config parsing error I think)

I monitor 2 ubiquiti devices (edgerouters), I see the same behavior for both of them, occasionally I see diffs like:

  #RANCID-CONTENT-TYPE: edgerouter                                                                                                     
  #                                                                                                                                    
- #Version:      v2.0.8-hotfix.1                                                                                                       
+ #show hardware cpu^JVersion:      v2.0.8-hotfix.1                                                                                    
  #Build ID:     5278088                                                                                                               
  #Build on:     03/05/20 16:41                                                                                                        
  #HW model:     EdgeRouter X 5-Port                                                                                                   
  #HW S/N:       F09FC26FF449                                                                                                          
  #                       

followed by a diff like:

  #RANCID-CONTENT-TYPE: edgerouter                                                                                                     
  #                                                                                                                                    
- #show hardware cpu^JVersion:      v2.0.8-hotfix.1                                                                                    
+ #Version:      v2.0.8-hotfix.1                                                                                                       
  #Build ID:     5278088                                                                                                               
  #Build on:     03/05/20 16:41                                                                                                        
  #HW model:     EdgeRouter X 5-Port                                                                                                   
  #HW S/N:       F09FC26FF449                                                                                                          
  #                    

I take this to mean that for the first diff 'Version' and 'show hardware' got stuck together on the same 'line', and on the subsequent run that stickiness did not happen. Ctrl-J is a linefeed (I think) character, perhaps:

tr/\015//d;

adding a removal of \012 helps? :)

Support for Cisco Catalyst 9800 WLAN controllers (IOS XE 17.3.x)

Hello,

Rancid seems not to match the prompt correctly at login via SSH as it has two preceeding empty lines "\r\n\r\n" after motd banner and before the prompt.

[rancid@backuphost ~]$ ssh [email protected]
Password:

wlc1>enable
Password:
wlc1#

Debug output of clogin:

[rancid@backuphost ~]$ clogin -d wlc1.example.com
wlc1.example.com
spawn ssh -i /mnt/backup/rancid/.ssh/id_rsa -x -l rancid wlc1.example.com
parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {821186}
Gate keeper glob pattern for '^<-+ More -+>[^]' is ''. Not usable, disabling the performance booster.
Gate keeper glob pattern for '(Connection refused|Secure connection [^]+ refused)' is ''. Not usable, disabling the performance booster.
Gate keeper glob pattern for '(Connection closed by|Connection to [^]+ closed)' is ''. Not usable, disabling the performance booster.
Gate keeper glob pattern for '(Host key not found |The authenticity of host .
be established)' is ''. Not usable, disabling the performance booster.
Gate keeper glob pattern for 'HOST IDENTIFICATION HAS CHANGED' is 'HOST IDENTIFICATION HAS CHANGED'. Activating booster.
Gate keeper glob pattern for 'Offending key for ' is 'Offending key for '. Activating booster.
Gate keeper glob pattern for '^warning: remote host denied authentication agent forwarding.' is 'warning: remote host denied authentication agent forwarding?'. Activating booster.
Gate keeper glob pattern for '(denied|Sorry)' is ''. Not usable, disabling the performance booster.
Gate keeper glob pattern for 'last login:' is 'last login:'. Activating booster.
Gate keeper glob pattern for 'failed login:' is 'failed login:'. Activating booster.
Gate keeper glob pattern for '% (Bad passwords|Authentication failed)' is ''. Not usable, disabling the performance booster.
Gate keeper glob pattern for 'Enter Selection: ' is 'Enter Selection: '. Activating booster.
Gate keeper glob pattern for 'Press the key [^]+[
]+' is 'Press the key '. Activating booster.
Gate keeper glob pattern for '@[^]+ ([Pp]assword|passwd|Enter password for [^ :]+):' is ''. Not usable, disabling the performance booster.
Gate keeper glob pattern for 'Enter passphrase.
: ' is 'Enter passphrase*: '. Activating booster.
Gate keeper glob pattern for '([Uu]sername|[Ll]ogin|[Uu]ser [Nn]ame|User):' is ''. Not usable, disabling the performance booster.
Gate keeper glob pattern for '([Pp]assword|passwd|Enter password for [^ :]+):' is ''. Not usable, disabling the performance booster.
Gate keeper glob pattern for '(>|#| (enable))' is ''. Not usable, disabling the performance booster.
Gate keeper glob pattern for '[^]*[
]+' is ''. Not usable, disabling the performance booster.

expect: does "" (spawn_id exp6) match regular expression "^<-+ More -+>[^\n\r]*"? (No Gate, RE only) gate=yes re=no
"(Connection refused|Secure connection [^\n\r]+ refused)"? (No Gate, RE only) gate=yes re=no
"(Connection closed by|Connection to [^\n\r]+ closed)"? (No Gate, RE only) gate=yes re=no

expect: does "" (spawn_id exp6) match glob pattern "unknown host\r"? no

expect: does "" (spawn_id exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established)"? (No Gate, RE only) gate=yes re=no
"HOST IDENTIFICATION HAS CHANGED"? Gate "HOST IDENTIFICATION HAS CHANGED"? gate=no
"Offending key for "? Gate "Offending key for "? gate=no

expect: does "" (spawn_id exp6) match regular expression "^warning: remote host denied authentication agent forwarding."? Gate "warning: remote host denied authentication agent forwarding?"? gate=no

expect: does "" (spawn_id exp6) match regular expression "(denied|Sorry)"? (No Gate, RE only) gate=yes re=no

expect: does "" (spawn_id exp6) match regular expression "last login:"? Gate "last login:"? gate=no
"failed login:"? Gate "failed login:"? gate=no

expect: does "" (spawn_id exp6) match glob pattern "Login failed"? no
"% (Bad passwords|Authentication failed)"? (No Gate, RE only) gate=yes re=no
"Press any key to continue"? no
"Enter Selection: "? Gate "Enter Selection: "? gate=no
"Press the key [^\r\n]+[\r\n]+"? Gate "Press the key "? gate=no
"@[^\r\n]+ ([Pp]assword|passwd|Enter password for [^ :]+):"? (No Gate, RE only) gate=yes re=no
"Enter passphrase.
: "? Gate "Enter passphrase*: "? gate=no
"([Uu]sername|[Ll]ogin|[Uu]ser [Nn]ame|User):"? (No Gate, RE only) gate=yes re=no
"([Pp]assword|passwd|Enter password for [^ :]+):"? (No Gate, RE only) gate=yes re=no
"(>|#| (enable))"? (No Gate, RE only) gate=yes re=no
"Login invalid"? no
"[^\r\n][\r\n]+"? (No Gate, RE only) gate=yes re=no
Password:
expect: does "\rPassword: " (spawn_id exp6) match regular expression "^<-+ More -+>[^\n\r]
"? (No Gate, RE only) gate=yes re=no
"(Connection refused|Secure connection [^\n\r]+ refused)"? (No Gate, RE only) gate=yes re=no
"(Connection closed by|Connection to [^\n\r]+ closed)"? (No Gate, RE only) gate=yes re=no

expect: does "\rPassword: " (spawn_id exp6) match glob pattern "unknown host\r"? no

expect: does "\rPassword: " (spawn_id exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established)"? (No Gate, RE only) gate=yes re=no
"HOST IDENTIFICATION HAS CHANGED"? Gate "HOST IDENTIFICATION HAS CHANGED"? gate=no
"Offending key for "? Gate "Offending key for "? gate=no

expect: does "\rPassword: " (spawn_id exp6) match regular expression "^warning: remote host denied authentication agent forwarding."? Gate "warning: remote host denied authentication agent forwarding?"? gate=no

expect: does "\rPassword: " (spawn_id exp6) match regular expression "(denied|Sorry)"? (No Gate, RE only) gate=yes re=no

expect: does "\rPassword: " (spawn_id exp6) match regular expression "last login:"? Gate "last login:"? gate=no
"failed login:"? Gate "failed login:"? gate=no

expect: does "\rPassword: " (spawn_id exp6) match glob pattern "Login failed"? no
"% (Bad passwords|Authentication failed)"? (No Gate, RE only) gate=yes re=no
"Press any key to continue"? no
"Enter Selection: "? Gate "Enter Selection: "? gate=no
"Press the key [^\r\n]+[\r\n]+"? Gate "Press the key "? gate=no
"@[^\r\n]+ ([Pp]assword|passwd|Enter password for [^ :]+):"? (No Gate, RE only) gate=yes re=no
"Enter passphrase.
: "? Gate "Enter passphrase*: "? gate=no
"([Uu]sername|[Ll]ogin|[Uu]ser [Nn]ame|User):"? (No Gate, RE only) gate=yes re=no
"([Pp]assword|passwd|Enter password for [^ :]+):"? (No Gate, RE only) gate=yes re=yes
expect: set expect_out(0,string) "Password:"
expect: set expect_out(1,string) "Password"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "\rPassword:"
send: sending "xrJSg2-b6BA9o-9iV4qc\r" to { exp6 }
expect: continuing expect

expect: does " " (spawn_id exp6) match regular expression "^<-+ More -+>[^\n\r]*"? (No Gate, RE only) gate=yes re=no
"(Connection refused|Secure connection [^\n\r]+ refused)"? (No Gate, RE only) gate=yes re=no
"(Connection closed by|Connection to [^\n\r]+ closed)"? (No Gate, RE only) gate=yes re=no

expect: does " " (spawn_id exp6) match glob pattern "unknown host\r"? no

expect: does " " (spawn_id exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established)"? (No Gate, RE only) gate=yes re=no
"HOST IDENTIFICATION HAS CHANGED"? Gate "HOST IDENTIFICATION HAS CHANGED"? gate=no
"Offending key for "? Gate "Offending key for "? gate=no

expect: does " " (spawn_id exp6) match regular expression "^warning: remote host denied authentication agent forwarding."? Gate "warning: remote host denied authentication agent forwarding?"? gate=no

expect: does " " (spawn_id exp6) match regular expression "(denied|Sorry)"? (No Gate, RE only) gate=yes re=no

expect: does " " (spawn_id exp6) match regular expression "last login:"? Gate "last login:"? gate=no
"failed login:"? Gate "failed login:"? gate=no

expect: does " " (spawn_id exp6) match glob pattern "Login failed"? no
"% (Bad passwords|Authentication failed)"? (No Gate, RE only) gate=yes re=no
"Press any key to continue"? no
"Enter Selection: "? Gate "Enter Selection: "? gate=no
"Press the key [^\r\n]+[\r\n]+"? Gate "Press the key "? gate=no
"@[^\r\n]+ ([Pp]assword|passwd|Enter password for [^ :]+):"? (No Gate, RE only) gate=yes re=no
"Enter passphrase.
: "? Gate "Enter passphrase*: "? gate=no
"([Uu]sername|[Ll]ogin|[Uu]ser [Nn]ame|User):"? (No Gate, RE only) gate=yes re=no
"([Pp]assword|passwd|Enter password for [^ :]+):"? (No Gate, RE only) gate=yes re=no
"(>|#| (enable))"? (No Gate, RE only) gate=yes re=no
"Login invalid"? no
"[^\r\n]*[\r\n]+"? (No Gate, RE only) gate=yes re=no

expect: does " \r\n" (spawn_id exp6) match regular expression "^<-+ More -+>[^\n\r]*"? (No Gate, RE only) gate=yes re=no
"(Connection refused|Secure connection [^\n\r]+ refused)"? (No Gate, RE only) gate=yes re=no
"(Connection closed by|Connection to [^\n\r]+ closed)"? (No Gate, RE only) gate=yes re=no

expect: does " \r\n" (spawn_id exp6) match glob pattern "unknown host\r"? no

expect: does " \r\n" (spawn_id exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established)"? (No Gate, RE only) gate=yes re=no
"HOST IDENTIFICATION HAS CHANGED"? Gate "HOST IDENTIFICATION HAS CHANGED"? gate=no
"Offending key for "? Gate "Offending key for "? gate=no

expect: does " \r\n" (spawn_id exp6) match regular expression "^warning: remote host denied authentication agent forwarding."? Gate "warning: remote host denied authentication agent forwarding?"? gate=no

expect: does " \r\n" (spawn_id exp6) match regular expression "(denied|Sorry)"? (No Gate, RE only) gate=yes re=no

expect: does " \r\n" (spawn_id exp6) match regular expression "last login:"? Gate "last login:"? gate=no
"failed login:"? Gate "failed login:"? gate=no

expect: does " \r\n" (spawn_id exp6) match glob pattern "Login failed"? no
"% (Bad passwords|Authentication failed)"? (No Gate, RE only) gate=yes re=no
"Press any key to continue"? no
"Enter Selection: "? Gate "Enter Selection: "? gate=no
"Press the key [^\r\n]+[\r\n]+"? Gate "Press the key "? gate=no
"@[^\r\n]+ ([Pp]assword|passwd|Enter password for [^ :]+):"? (No Gate, RE only) gate=yes re=no
"Enter passphrase.
: "? Gate "Enter passphrase*: "? gate=no
"([Uu]sername|[Ll]ogin|[Uu]ser [Nn]ame|User):"? (No Gate, RE only) gate=yes re=no
"([Pp]assword|passwd|Enter password for [^ :]+):"? (No Gate, RE only) gate=yes re=no
"(>|#| (enable))"? (No Gate, RE only) gate=yes re=no
"Login invalid"? no
"[^\r\n]*[\r\n]+"? (No Gate, RE only) gate=yes re=yes
expect: set expect_out(0,string) " \r\n"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) " \r\n"
expect: continuing expect

expect: does "" (spawn_id exp6) match regular expression "^<-+ More -+>[^\n\r]*"? (No Gate, RE only) gate=yes re=no
"(Connection refused|Secure connection [^\n\r]+ refused)"? (No Gate, RE only) gate=yes re=no
"(Connection closed by|Connection to [^\n\r]+ closed)"? (No Gate, RE only) gate=yes re=no

expect: does "" (spawn_id exp6) match glob pattern "unknown host\r"? no

expect: does "" (spawn_id exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established)"? (No Gate, RE only) gate=yes re=no
"HOST IDENTIFICATION HAS CHANGED"? Gate "HOST IDENTIFICATION HAS CHANGED"? gate=no
"Offending key for "? Gate "Offending key for "? gate=no

expect: does "" (spawn_id exp6) match regular expression "^warning: remote host denied authentication agent forwarding."? Gate "warning: remote host denied authentication agent forwarding?"? gate=no

expect: does "" (spawn_id exp6) match regular expression "(denied|Sorry)"? (No Gate, RE only) gate=yes re=no

expect: does "" (spawn_id exp6) match regular expression "last login:"? Gate "last login:"? gate=no
"failed login:"? Gate "failed login:"? gate=no

expect: does "" (spawn_id exp6) match glob pattern "Login failed"? no
"% (Bad passwords|Authentication failed)"? (No Gate, RE only) gate=yes re=no
"Press any key to continue"? no
"Enter Selection: "? Gate "Enter Selection: "? gate=no
"Press the key [^\r\n]+[\r\n]+"? Gate "Press the key "? gate=no
"@[^\r\n]+ ([Pp]assword|passwd|Enter password for [^ :]+):"? (No Gate, RE only) gate=yes re=no
"Enter passphrase.
: "? Gate "Enter passphrase*: "? gate=no
"([Uu]sername|[Ll]ogin|[Uu]ser [Nn]ame|User):"? (No Gate, RE only) gate=yes re=no
"([Pp]assword|passwd|Enter password for [^ :]+):"? (No Gate, RE only) gate=yes re=no
"(>|#| (enable))"? (No Gate, RE only) gate=yes re=no
"Login invalid"? no
"[^\r\n]*[\r\n]+"? (No Gate, RE only) gate=yes re=no

wlc1>
expect: does "\r\n\r\nwlc1>" (spawn_id exp6) match regular expression "^<-+ More -+>[^\n\r]*"? (No Gate, RE only) gate=yes re=no
"(Connection refused|Secure connection [^\n\r]+ refused)"? (No Gate, RE only) gate=yes re=no
"(Connection closed by|Connection to [^\n\r]+ closed)"? (No Gate, RE only) gate=yes re=no

expect: does "\r\n\r\nwlc1>" (spawn_id exp6) match glob pattern "unknown host\r"? no

expect: does "\r\n\r\nwlc1>" (spawn_id exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established)"? (No Gate, RE only) gate=yes re=no
"HOST IDENTIFICATION HAS CHANGED"? Gate "HOST IDENTIFICATION HAS CHANGED"? gate=no
"Offending key for "? Gate "Offending key for "? gate=no

expect: does "\r\n\r\nwlc1>" (spawn_id exp6) match regular expression "^warning: remote host denied authentication agent forwarding."? Gate "warning: remote host denied authentication agent forwarding?"? gate=no

expect: does "\r\n\r\nwlc1>" (spawn_id exp6) match regular expression "(denied|Sorry)"? (No Gate, RE only) gate=yes re=no

expect: does "\r\n\r\nwlc1>" (spawn_id exp6) match regular expression "last login:"? Gate "last login:"? gate=no
"failed login:"? Gate "failed login:"? gate=no

expect: does "\r\n\r\nwlc1>" (spawn_id exp6) match glob pattern "Login failed"? no
"% (Bad passwords|Authentication failed)"? (No Gate, RE only) gate=yes re=no
"Press any key to continue"? no
"Enter Selection: "? Gate "Enter Selection: "? gate=no
"Press the key [^\r\n]+[\r\n]+"? Gate "Press the key "? gate=no
"@[^\r\n]+ ([Pp]assword|passwd|Enter password for [^ :]+):"? (No Gate, RE only) gate=yes re=no
"Enter passphrase.
: "? Gate "Enter passphrase*: "? gate=no
"([Uu]sername|[Ll]ogin|[Uu]ser [Nn]ame|User):"? (No Gate, RE only) gate=yes re=no
"([Pp]assword|passwd|Enter password for [^ :]+):"? (No Gate, RE only) gate=yes re=no
"(>|#| (enable))"? (No Gate, RE only) gate=yes re=yes
expect: set expect_out(0,string) ">"
expect: set expect_out(1,string) ">"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "\r\n\r\nwlc1>"
send: sending "\r" to { exp6 }
Gate keeper glob pattern for '[
]+' is ''. Not usable, disabling the performance booster.
Gate keeper glob pattern for '^(.+[:.])1 ((>|#| (enable)))' is ''. Not usable, disabling the performance booster.
Gate keeper glob pattern for '^.+(>|#| (enable))' is ''. Not usable, disabling the performance booster.

expect: does "" (spawn_id exp6) match regular expression "[\r\n]+"? (No Gate, RE only) gate=yes re=no
"^(.+[:.])1 ((>|#| (enable)))"? (No Gate, RE only) gate=yes re=no
"^.+(>|#| (enable))"? (No Gate, RE only) gate=yes re=no

expect: does "\r\n" (spawn_id exp6) match regular expression "[\r\n]+"? (No Gate, RE only) gate=yes re=yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "\r\n"
expect: continuing expect

expect: does "" (spawn_id exp6) match regular expression "[\r\n]+"? (No Gate, RE only) gate=yes re=no
"^(.+[:.])1 ((>|#| (enable)))"? (No Gate, RE only) gate=yes re=no
"^.+(>|#| (enable))"? (No Gate, RE only) gate=yes re=no
wlc1>
expect: does "wlc1>" (spawn_id exp6) match regular expression "[\r\n]+"? (No Gate, RE only) gate=yes re=no
"^(.+[:.])1 ((>|#| (enable)))"? (No Gate, RE only) gate=yes re=no
"^.+(>|#| (enable))"? (No Gate, RE only) gate=yes re=yes
expect: set expect_out(0,string) "wlc1>"
expect: set expect_out(1,string) ">"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "wlc1>"
tty_raw_noecho: was raw = 0 echo = 1

Mikrotik router OS version 7.1rc3 backup failed

Hi,

We have recently upgraded Mikrotik core routers to Mikrotik router OS version 7.1rc3.
After upgrade rancid Mikrotik backups stopped for Mikrotik router OS version 7.1rc3. Other routers are backing up, which are running on Mikrotik router OS version 6.x.

We are getting below errors logs,

missed cmd(s): all commands
: End of run not found

your help is greatly appreciated

Support for JunOS | Show System Alarms

Hi,

Is it possibe to add support for Juniper SRX's to "show system alarms", currently as I can see we only have chassis alarms. This would be helpful because it will show errors such as an IDS Licence expiry?

juniper-srx;command;junos::ShowSystemAlarms;show system alarms

I naively thought I could just add it myself to the configuration but this results in :

loadtype: undefined function in juniper-srx: junos::ShowSystemAlarms Couldn't load device type spec for juniper-srx loadtype: undefined function in juniper-srx: junos::ShowSystemAlarms Couldn't load device type spec for juniper-srx loadtype: undefined function in juniper-srx: junos::ShowSystemAlarms Couldn't load device type spec for juniper-srx loadtype: undefined function in juniper-srx: junos::ShowSystemAlarms Couldn't load device type spec for juniper-srx =====================================

Thanks for your consideration.

ioxr - add feature_list to list to ignore

on iox 7.8.x "feature_list" is another file showing up on flash that keeps getting updated just like the nvgen_bkup.log
https://github.com/haussli/rancid/blob/master/lib/iosxr.pm.in#L656-L659

sample noise:

diff --git a/configs/r16.labxtx03.us.bb.gin.ntt.net b/configs/r16.labxtx03.us.bb.gin.ntt.net
index 8886c2d74..3d647dd13 100644
- -- a/configs/r16.labxtx03.us.bb.gin.ntt.net
@@ -518,12 +518,12 @@
  !Flash: harddisk: -rw-rw-rw-. 1       1620 Feb  7 22:25 debug_shell_client.log
  !Flash: harddisk: drwxrwxrwx. 2       4096 May 17  2022 dumper
  !Flash: harddisk: -rw-r--r--. 1      20132 Jul  7  2022 enc_error_20220707_205840.log
- !Flash: harddisk: -rw-rw-rw-. 1        387 Mar 22 22:31 feature_list
+ !Flash: harddisk: -rw-rw-rw-. 1        387 Mar 22 23:31 feature_list
  !Flash: harddisk: drwx------. 3       4096 Feb  7 22:26 ima
  !Flash: harddisk: drwx------. 2      16384 May 17  2022 lost+found
  !Flash: harddisk: drwxrwxrwx. 3       4096 May 17  2022 mirror
  !Flash: harddisk: drwxrwxrwx. 2       4096 Mar 21 08:09 npu_sdk_logs
- !Flash: harddisk: -rw-rw-rw-. 1    8389113 Mar 22 22:38 nvgen_bkup.log
+ !Flash: harddisk: -rw-rw-rw-. 1    8389113 Mar 22 23:33 nvgen_bkup.log
  !Flash: harddisk: drwxrwxrwx. 2       4096 May 17  2022 nvram
  !Flash: harddisk: drwxr-xr-x. 3       4096 May 17  2022 pam

nxos.pm reports current fan speed of device

I added some Cisco MDS devices running NX-OS and noticed when it runs "show environment fan" it dumps the current fan (or fans) speed, causing a diff on every run.

After some testing I've added the below to sub ShowEnv, and although it isn't as neat as the process in ShowEnvTemp it seems to work.

        if (/(fan speed)/i) {
            ProcessHistory("COMMENTS","","","!Env: $_");
            while (<$INPUT>) {
                tr/\015//d;
                goto EndShowEnv if (/^$prompt/);
                if (/(^ChassisFan)(.*)(\d\d\d\d\s\s[-]\s\s\d\d\d\d)/) {
                   $_ = sprintf("%s%-". length($2)."s%s\n", $1, $2, "");
                }
                ProcessHistory("COMMENTS","","","!Env: $_");
                last if (/^\s*$/);
            }
            next;
        }

Perhaps someone who is more skilled than me could take this and do it more cleanly? ShowEnvTemp removes the unused column text (CurTemp), although I'm not sure how.

Mikrotik exports cut off by scripts in the config

Exports from my device are getting cut off after certain system scripts. It seems to be something to do with the contents of the script; if I install the following script on my router, it and everything in the configuration afterwards is removed:

:local domains [:toarray ""]
:local dnsttl "90m"

:local magiccomment "automatic-from-dhcp (magic comment)"
:local activehosts [:toarray ""]

:foreach lease in [/ip dhcp-server lease find] do={
  :local hostname [/ip dhcp-server lease get value-name=host-name $lease]
  :local hostaddr [/ip dhcp-server lease get value-name=address $lease]

  :if ([:len $hostname] > 0) do={
    :foreach domain in $domains do={
      :local regdomain "$hostname.$domain"
      :set activehosts ($activehosts, $regdomain)

      :if ([:len [/ip dns static find where name=$regdomain]] = 0) do={
        # add new entry
        /ip dns static add name=$regdomain address=$hostaddr comment=$magiccomment ttl=$dnsttl
      } else={
        :if ([:len [/ip dns static find where name=$regdomain address=$hostaddr comment=$magiccomment]] = 0) do={
          # update entry only if IP, name, and comment don't match
          /ip dns static set address=$hostaddr [/ip dns static find name=$regdomain comment=$magiccomment]
        }
      }
    }
  }
}

# remove old entries
:foreach dnsentry in [/ip dns static find where comment=$magiccomment] do={
  :local hostname [/ip dns static get value-name=name $dnsentry]
  :if ([:type [:find $activehosts $hostname]] = "nil") do={
    /ip dns static remove $dnsentry
  }
}

The debug output is a little overwhelming considering my configuration is 600 lines long and each line seems to generate a half dozen lines of debug. How can I narrow down what the problem might be?

Mikrotik router OS version 7.2.1 backup failed

By enabling "dumb" terminal mode backup was working fine but recently we upgraded some routers to Mikrotik router OS version 7.2.1 and now we are getting the same error.
missed cmd(s): all commands
: End of run not found

your help is greatly appreciated
thank you in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.