Re: [rancid] Notifications on Errors

2019-06-19 Thread Ryan Gelobter
Thanks Craig. rancid-admin-group@ was exactly what i needed.

On Wed, Jun 19, 2019 at 4:48 PM Ryan Gelobter <
rya...@andthenwegotpaycuts.com> wrote:

> Thanks Craig. rancid-admin-group@ was exactly what i needed.
>
> On Wed, Jun 19, 2019 at 1:00 PM john heasley  wrote:
>
>> Wed, Jun 19, 2019 at 12:03:42PM +0100, Craig Hopkins:
>> > Each one has a specific role. They don't duplicate.
>>
>> It is not the errors themselves that are sent to the admin list.  it
>> sends notification about devices added/removed (which is duplicated
>> to the diff list in diff form of router.db) and when the age of a
>> device's collection exceed rancid.conf(5):OLDTIME time.  Off the top,
>> that is all that goes to admin.
>>
>
___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Unable to figure out "end of run not found"

2019-06-19 Thread Nick Nauwelaerts
iirc:
; is to seperate commands and wil execute the whole command string without 
checking the return value of the previous command
&& will do the same, but if previous command returns not null (you can check 
the return code of the previous command with "echo $?") it will end the command 
list.

the syntax is question "NOPIPE=yes" will set the environment variable NOPIPE 
but only for the context of the command that's executed.
appending ; between NOPIPE=yes & the command will _NOT_ do what you expect; it 
will execute and empty cmd with nopipe env set to yes, then execute your 
command with default envvars.


you can compare:

AHHA=aha env | grep -i aha
output -> AHHA=aha
AHHA=aha; env | grep -i aha
output -> nothing

export with set the envvar for your current session:
env  | grep -i nop
-> output nothing
export NOPIPE=yes
env  | grep -i nop
output ->NOPIPE=yes

all examples done in bash instead of my preferred zsh. if you use csh/tcsh or 
fish i would guess you know what you're doing and can adapt the config to work.

bottom line, this is correct for most bourne shell derivatives:
NOPIPE=yes rancid -d -t  


here's the catch, if you run rancid from cron you will either need to uncomment 
the NOPIPE line in yr rancid.conf or add them to your crontab entry.


side note:
the next rancid version will most likely change this behaviour:
https://github.com/haussli/rancid/commit/94318333c8f0d746abdd22cf4430636a394def8f



// nick



From: Rancid-discuss [mailto:rancid-discuss-boun...@shrubbery.net] On Behalf Of 
Gauthier, Chris
Sent: Tuesday, June 18, 2019 00:10
To: Piegorsch, Weylin William ; Michael Newton 
; Vacheslav Zouhairy 
Cc: rancid-discuss@shrubbery.net
Subject: Re: [rancid] Unable to figure out "end of run not found"

Interesting.  I thought it would get mixed up into the value of the variable…. 
I’m not an expert programmer at all, but thought I needed to use the ; to 
separate the commands appropriately.  But, my expertise on shell variables is a 
tad (understatement, really) limited.  So, I shall defer! :)

Cheers,
Chris


Chris​

Gauthier

 Senior Network Engineer

 |

Comscore



t +1 (503) 331-2704

 |

cgauth...@comscore.com



comscore.com



​​​This e-mail (including any attachments) may contain information that is 
private, confidential, or protected by attorney-client or other privilege. If 
you received this e-mail in error, please delete it from your system and notify 
sender.






From: "Piegorsch, Weylin William" 
Date: Monday, June 17, 2019 at 2:05 PM
To: "Gauthier, Chris" , Michael Newton 
, Vacheslav Zouhairy 
Cc: "rancid-discuss@shrubbery.net" 
Subject: Re: [rancid] Unable to figure out "end of run not found"

I actually don't use the semicolon. Not sure if this is bash specific, sh 
specific, or posix general, but without the semicolon it sets the global 
environment variable only for the duration of that command following the 
variable definition, and unset it upon returning control to the cli. See also 
your "export" comment, which has correlating implications regarding environment 
vs namespace vs scope.
But I'm not an experienced programmer, and don't pretend to grok the various 
nuances, benefits, and pitfalls known by those who actually know what they're 
doing, so if using the semicolon is better I all ears.
weylin
Sent from Outlook on my 'Droid


From: Gauthier, Chris 
Sent: Monday, June 17, 2019 4:22:02 PM
To: Piegorsch, Weylin William; Michael Newton; Vacheslav Zouhairy
Cc: rancid-discuss@shrubbery.net
Subject: Re: [rancid] Unable to figure out "end of run not found"

Don’t forget the ; between the NOPIPE=yes and the rest of the command!  :-)

Some flavors of linux also want you to use the export command..

Chris​

Gauthier

 Senior Network Engineer

 |

Comscore



t +1 (503) 331-2704

 |

cgauth...@comscore.com



comscore.com



​​​This e-mail (including any attachments) may contain information that is 
private, confidential, or protected by attorney-client or other privilege. If 
you received this e-mail in error, please delete it from your system and notify 
sender.






From: Rancid-discuss  on behalf of 
"Piegorsch, Weylin William" 
Date: Saturday, June 15, 2019 at 7:52 AM
To: Michael Newton , Vacheslav Zouhairy 
Cc: "rancid-discuss@shrubbery.net" 
Subject: Re: [rancid] Unable to figure out "end of run not found"

> So this got me looking for how to do debug output per-host

If you’re using Linux, the command is:

NOPIPE=yes rancid -d -t  

This will generate two files:
.new
.raw

.new is the parsed output
.raw is pure log of the session (ie, it even captures non-printing characters). 
 I believe it’s only dumped if you set both NOPIPE and -d.

I’ve used the .raw output on many occasions.  At the moment I’m even 
troubleshooting a device CPU issue that rancid tripped on that I wouldn’t have 
found but for this; “clogi

[rancid] platform parameter in clogin

2019-06-19 Thread Nick Nauwelaerts
heya,
so i noticed the rancid source recently migrated to github 
(https://github.com/haussli/rancid), so i was rebasing aerohive support on it.

during this process i noticed that the seperate aerohive login script could 
just as well be integrated in clogin.

it needs 2 changes:
it has it's own "config changed" prompt. that was easy to add and works as 
expected.

it needs it's own cli command to disable paging -> "console page 0"
since extreme alrdy had an exception i thought it would be as easy as adding an 
elseif to get aerohive support going, but it seems extreme gets special 
handling for the platform variable in clogin. so i was wondering what the 
advise is in this case? it seems silly to have keep a copy of clogin just 
because i need some other pager setup.

* keep a seperate login script: alrdy have one that works, so that's an option. 
however, as with other login scripts it will diverge over time from the main 
clogin if not synced manually each time
* add a cludge to clogin to recognize aerohive devices and somehow set platform
* be able to pass platform via -E (doesn't seem to work atm, most likely since 
it gets reset -> # attempt at platform switching. set platform "")
* deduce platform from router.db, but clogin doesn't really need that
* add platform as an optional parameter to cloginrc
* ... things i didn't think of


any hints on how to best tackle this? rancid version is git master/head.

thx

// nick




Volg Aquafin op Facebook | 
Twitter | 
YouTube | 
LinkedIN | 
Instagram

In het kader van de uitoefening van onze taken verzamelen we bij Aquafin 
persoonsgegevens. Hoe we omgaan met deze gegevens en wat de rechten van de 
betrokkenen zijn, kan je nalezen in onze privacy 
policy.

  P Denk aan het milieu. Druk deze mail niet onnodig af.
___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Notifications on Errors

2019-06-19 Thread john heasley
Wed, Jun 19, 2019 at 12:03:42PM +0100, Craig Hopkins:
> Each one has a specific role. They don't duplicate.

It is not the errors themselves that are sent to the admin list.  it
sends notification about devices added/removed (which is duplicated
to the diff list in diff form of router.db) and when the age of a
device's collection exceed rancid.conf(5):OLDTIME time.  Off the top,
that is all that goes to admin.

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Notifications on Errors

2019-06-19 Thread Craig Hopkins
Each one has a specific role. They don't duplicate.

Cheers,

Craig

On Wed, 19 Jun 2019 at 11:44, Ryan Gelobter  wrote:

> Will that notify me on just errors and not diffs too if I setup rancid to
> email?
>
> On Wed, Jun 19, 2019, 5:38 AM Craig Hopkins  wrote:
>
>> Sorry,
>>
>> rancid-group@ for diffs
>> rancid-admin-group@ for errors
>>
>> Step 6 of https://github.com/renard/rancid/blob/master/README
>>
>> Cheers,
>>
>> Craig
>>
>> On Wed, 19 Jun 2019 at 11:35, Craig Hopkins 
>> wrote:
>>
>>> On mine, I have group@ which emails out the updates for my devices in
>>> "group" and rancid-group@ which rancid uses to email out alerts. I
>>> thought this was the standard approach?
>>>
>>> On Wed, 19 Jun 2019 at 11:00, Ryan Gelobter  wrote:
>>>
 Is there anything anyone has more recent than the post below to get
 notified when RANCID runs but has errors? Such as can't login, no available
 cipher type, etc? Someone mentioned in 2012 they wrote a wrapper to syslog
 and send that to splunk to and write reports based off the logs but never
 posted the script.


 http://www.shrubbery.net/pipermail/rancid-discuss/2012-January/006152.html

 Thanks,
 Ryan
 ___
 Rancid-discuss mailing list
 Rancid-discuss@shrubbery.net
 http://www.shrubbery.net/mailman/listinfo/rancid-discuss

>>>
___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Notifications on Errors

2019-06-19 Thread Ryan Gelobter
Will that notify me on just errors and not diffs too if I setup rancid to
email?

On Wed, Jun 19, 2019, 5:38 AM Craig Hopkins  wrote:

> Sorry,
>
> rancid-group@ for diffs
> rancid-admin-group@ for errors
>
> Step 6 of https://github.com/renard/rancid/blob/master/README
>
> Cheers,
>
> Craig
>
> On Wed, 19 Jun 2019 at 11:35, Craig Hopkins  wrote:
>
>> On mine, I have group@ which emails out the updates for my devices in
>> "group" and rancid-group@ which rancid uses to email out alerts. I
>> thought this was the standard approach?
>>
>> On Wed, 19 Jun 2019 at 11:00, Ryan Gelobter  wrote:
>>
>>> Is there anything anyone has more recent than the post below to get
>>> notified when RANCID runs but has errors? Such as can't login, no available
>>> cipher type, etc? Someone mentioned in 2012 they wrote a wrapper to syslog
>>> and send that to splunk to and write reports based off the logs but never
>>> posted the script.
>>>
>>>
>>> http://www.shrubbery.net/pipermail/rancid-discuss/2012-January/006152.html
>>>
>>> Thanks,
>>> Ryan
>>> ___
>>> Rancid-discuss mailing list
>>> Rancid-discuss@shrubbery.net
>>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>>>
>>
___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Notifications on Errors

2019-06-19 Thread Craig Hopkins
Sorry,

rancid-group@ for diffs
rancid-admin-group@ for errors

Step 6 of https://github.com/renard/rancid/blob/master/README

Cheers,

Craig

On Wed, 19 Jun 2019 at 11:35, Craig Hopkins  wrote:

> On mine, I have group@ which emails out the updates for my devices in
> "group" and rancid-group@ which rancid uses to email out alerts. I
> thought this was the standard approach?
>
> On Wed, 19 Jun 2019 at 11:00, Ryan Gelobter  wrote:
>
>> Is there anything anyone has more recent than the post below to get
>> notified when RANCID runs but has errors? Such as can't login, no available
>> cipher type, etc? Someone mentioned in 2012 they wrote a wrapper to syslog
>> and send that to splunk to and write reports based off the logs but never
>> posted the script.
>>
>> http://www.shrubbery.net/pipermail/rancid-discuss/2012-January/006152.html
>>
>> Thanks,
>> Ryan
>> ___
>> Rancid-discuss mailing list
>> Rancid-discuss@shrubbery.net
>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>>
>
___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Notifications on Errors

2019-06-19 Thread Craig Hopkins
On mine, I have group@ which emails out the updates for my devices in
"group" and rancid-group@ which rancid uses to email out alerts. I thought
this was the standard approach?

On Wed, 19 Jun 2019 at 11:00, Ryan Gelobter  wrote:

> Is there anything anyone has more recent than the post below to get
> notified when RANCID runs but has errors? Such as can't login, no available
> cipher type, etc? Someone mentioned in 2012 they wrote a wrapper to syslog
> and send that to splunk to and write reports based off the logs but never
> posted the script.
>
> http://www.shrubbery.net/pipermail/rancid-discuss/2012-January/006152.html
>
> Thanks,
> Ryan
> ___
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>
___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


[rancid] Notifications on Errors

2019-06-19 Thread Ryan Gelobter
Is there anything anyone has more recent than the post below to get
notified when RANCID runs but has errors? Such as can't login, no available
cipher type, etc? Someone mentioned in 2012 they wrote a wrapper to syslog
and send that to splunk to and write reports based off the logs but never
posted the script.

http://www.shrubbery.net/pipermail/rancid-discuss/2012-January/006152.html

Thanks,
Ryan
___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss