Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a switch to route_check to control whether write log to syslog (s…
…onic-net#1215) route_check.py will report an ERROR in syslog if route mismatch is found, which is out control of monit config file. This commit add an option (-s) to control whether error will be reported in syslog. **- How to verify it** The update is verified on Arista-7260. 1. Add a static route whose nexthop is not reachable. ``` ip route add 1.1.1.1 via 192.168.1.101 ``` 2. Run ```route_check.py```, and error msg is only printed on stdout. Nothing is writen to syslog 3. Run ```route_check.py -s```. and error msg is writen to both stdout and syslog 4. Wait for 15 minutes, and confirm that monit will report the error ``` Nov 4 09:30:36.917367 str-7260cx3-acs-2 ERR monit[631]: 'routeCheck' status failed (255) -- results: { {#12 "missed_ROUTE_TABLE_routes": [#12 "1.1.1.1/32"#12 ]#12} }#12 Failed. Look at reported mismatches above ``` Signed-off-by: bingwang <bingwang@microsoft.com>
- Loading branch information