Skip to content

Python script to reset sflow on Juniper switches if it has adapated

Notifications You must be signed in to change notification settings

jryburn/reset-sflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

reset-sflow

Juniper Networks switches uses an Adaptative Sampling Rate that increases the sampling rate when the CPU is busy to protect the switch. However, the sampling rate does not come back down when the CPU comes back down. This script is designed to be run on a cronjob to check the sampling rate (2048 in my case) once a day and reset it if it has increased.

Adaptive Sampling

More information on Juniper's use of Adaptative Sampling can be found here: Sflow EX Series

Dependencies

This script will need the Juniper PYEZ modules.

sudo -H pip install junos-eznc

Installing

You will need to create a cronjob to run the script once a day. I run mine at midnight but any time is probably fine.

crontab -e

Add this line to the bottom of the file and save.

0 00 * * * /home/jryburn/reset-sflow.py

About

Python script to reset sflow on Juniper switches if it has adapated

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages