Welcome, Guest. Please login or register.

Author Topic: Log in to switch every hour  (Read 1313 times)

adispi

  • Newbie
  • *
  • Posts: 12
    • View Profile
Log in to switch every hour
« on: June 07, 2016, 09:23:48 AM »
i am running a crontab every hour as recommended to keep the health system updated.
however, it keeps loggin in to the switches every hour.
i tried to ignore (-S) backups (bB) and it still keeps login in to my switches every hour.
i am implementing a login alert on all my switches and do not want a lot of eamils every hour.
is the login mandatory for the health system?
if not, what skip flag am i missing?

thank you

ascii

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Re: Log in to switch every hour
« Reply #1 on: June 07, 2016, 10:40:40 AM »
how does your cronjob looks like?

adispi

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Log in to switch every hour
« Reply #2 on: June 07, 2016, 10:52:21 AM »
0 */1 * * *     /usr/local/nedi/nedi.pl -Aall -SmvjbB > /tmp/nedi-`date +\%H`.run 2>&1

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2509
    • View Profile
    • NeDi
Re: Log in to switch every hour
« Reply #3 on: June 07, 2016, 12:08:21 PM »
There's no skip backup (-SB). It'll only backup with -b or -Bx (keeps last x backups as files)

NeDi tries to login to Cisco switches, because the MAC address table is more efficient to read via CLI. This is used for the ARP table on some FW as well. However, if NeDi couldn't log in the first time, it'll not try again and just throw a 'no valid user' error. You can suppress this by removing the 'c' from notify in nedi.conf.
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

adispi

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Log in to switch every hour
« Reply #4 on: June 07, 2016, 12:29:50 PM »
i have fount that if i add F to the skip (in the documentation this is fwd)

what i need to know, using -SF will it affect the health monitor? and what exactly does fwd means?

ascii

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Re: Log in to switch every hour
« Reply #5 on: June 08, 2016, 08:56:30 AM »
i don't think it will effect the health monitor.

fwd ist forwarding database
it's more ore less the table with all the MAC Adresses on the network. so the switch knows where to send the packet

my crontab looks like these
Code: [Select]
#  over the day
15,45 1-23 * * *    perl /var/nedi/nedi.pl -Smv -P 2 -r -u /var/nedi/seedlist.core > /tmp/nedi-seedlist.core.log 2>&1

0,30 1-23 * * *         perl /var/nedi/nedi.pl -Smv -A 'RIGHT(INET_NTOA(devip), 1) IN (1, 5)'  > /tmp/nedi-seedlist.ip.1u5.log 2>&1
1,31 1-23 * * *         perl /var/nedi/nedi.pl -Smv -A 'RIGHT(INET_NTOA(devip), 1) IN (0, 6)'  > /tmp/nedi-seedlist.ip.0u6.log 2>&1
2,32 1-23 * * *         perl /var/nedi/nedi.pl -Smv -A 'RIGHT(INET_NTOA(devip), 1) IN (2, 7)'  > /tmp/nedi-seedlist.ip.2u7.log 2>&1
3,33 1-23 * * *         perl /var/nedi/nedi.pl -Smv -A 'RIGHT(INET_NTOA(devip), 1) IN (3, 8)'  > /tmp/nedi-seedlist.ip.3u8.log 2>&1
4,34 1-23 * * *         perl /var/nedi/nedi.pl -Smv -A 'RIGHT(INET_NTOA(devip), 1) IN (4, 9)'  > /tmp/nedi-seedlist.ip.4u9.log 2>&1

#nightly
5 0 * * *   perl /var/nedi/nedi.pl -SAF -p -u /var/nedi/seedlist.kre > /tmp/nedi-seedlist.night.kre.log  2>&1
10 0 * * *   perl /var/nedi/nedi.pl -SAF -p -u /var/nedi/seedlist.ess > /tmp/nedi-seedlist.night.ess.log 2>&1
54 0 * * *      perl /var/nedi/nedi.pl -SafsgmijtedbpowAO -b -A 'devos ="IOS-asa"' > /tmp/nedi-logfile-backup-fws
56 0 * * *      perl /var/nedi/nedi.pl -SafsgmijtedbpowAO -b -A 'devos ="NXOS"'  > /tmp/nedi-logfile-backup
45 0 * * *      perl /var/nedi/nedi.pl -SafsgmijtedbpowAO -b -A 'devos ="IOS"' >> /tmp/nedi-logfile-backup

0 6 * * 1      perl /var/nedi/stati.pl