cacti icon indicating copy to clipboard operation
cacti copied to clipboard

cacti 1.2.10 automation graph creation rules

Open matrixsh1t opened this issue 6 years ago • 5 comments

Good Day!

In cacti 1.2.10, I created automation rule, then the graph creation rule for device interfaces over SNMP . The filter, which I used to choose the ports/interfaces I need, does not filter out the Down interfaces. I use: Operation| Field |Operator |Pattern ---- | ifOperStatus | matches | Up AND | ifHwAddr | is not equal to | 0:0:0:0:0:0 AND | ifDescr | matches | WAN OR | ifDescr | matches | LAN

But still I get down interfaces in my list, and the graphs get created for those interfaces: x.x.x.x Up 2134639490 Up Up LAN 1/7/2 xxx ethernetCsmacd 1000000000 1000 90:55:ae:85:91:5c x.x.x.x Up 2134639491 Up Up LAN 1/7/3 xxx ethernetCsmacd 1000000000 1000 90:55:ae:85:91:5b x.x.x.x Up 2134639490 Up Up LAN 1/7/2 ethernetCsmacd 1000000000 1000 90:55:ae:11:cf:e x.x.x.x Up 2134639491 Down Up LAN 1/7/3 xxx ethernetCsmacd 0 0 90:55:ae:11:cf:d x.x.x.x Up 2134647782 Up Up WAN 1/7/102 xxx ethernetCsmacd 84273000 84 90:55:ae:11:cf:a x.x.x.x Up 2134647783 Up Up WAN 1/7/103 xxx ethernetCsmacd 318588000 318 90:55:ae:11:cf:c x.x.x.x Up 2134639490 Down Down LAN 1/7/2 ethernetCsmacd 0 0 0:0:0:0:0:0 x.x.x.x Up 2134639491 Up Up LAN 1/7/3 xxx ethernetCsmacd 1000000000 1000 4:4e:6:29:17:cc x.x.x.x Up 2134647781 Up Up WAN 1/7/101 xxx ethernetCsmacd 90438000 90 4:4e:6:29:17:c4

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'Automation'
  2. Click on 'Graph rules'
  3. Create the filter for known SNMP device
  4. See error in the list of filtered interfaces
  • OS: Centos7 for server and Win10 for client
  • Browser: chrome on Win10

graph_rule

matrixsh1t avatar May 10 '20 19:05 matrixsh1t

I might be wrong, but I'm betting if you removed that OR statement, it wouldn't find the wrong ones. Alternatively, try adding the operational status filter to the or side of the equation too. Trying to recall if there is a concept of brackets within the rules or not but without them, the OR is basically all the AND's together OR the match on LAN

netniV avatar May 11 '20 23:05 netniV

This is not a bug. It's kind of awkward, but you need to add brakets to around your logic. So, Item #2 needs to be a "(", and the last item needs to be a ")".

TheWitness avatar May 12 '20 00:05 TheWitness

Dear Friends! Big thanks to you for your help. I could not figure out how brackets work but I got the logic of the filter and made double creteria for 2 cases of filtering: if operstatus is up then ifdescrition is WAN and if operstatus is up then ifdescription is LAN.

right_graph_rule

matrixsh1t avatar May 12 '20 12:05 matrixsh1t

Please see the attached.

image

TheWitness avatar May 12 '20 15:05 TheWitness

Yeah yeah, I know how to find the brackets))) but whatever I tried with brackets I could not find the proper formula, it always showed no graphs in the filter.

matrixsh1t avatar May 12 '20 17:05 matrixsh1t