categoryName requirements cannot be ored with other requirements in categories.xml rules
Description
categoryName requirements cannot be ored with other requirements in categories.xml rules.
The following entry does not work as expected.
From categories.xml: <category> <label><![CDATA[DNS and DHCP Servers]]></label> <comment>This category includes all managed interfaces which are running either DNS (name resolution) servers or DHCP servers.</comment> <normal>99.99</normal> <warning>97</warning> <service>DNS</service> <service>DHCP</service> <rule><![CDATA[isDNS | isDHCP | categoryName == 'DHCP']]></rule> </category>
From rtc.log: 2007-07-18 16:06:02,157 DEBUG [Main] DataManager: Category: DNS and DHCP Servers (IPADDR != '0.0.0.0') & (isDNS | isDHCP | categoryName == 'DHCP') 2007-07-18 16:06:02,158 DEBUG [Main] JdbcFilterDao: Filter: SQL statement: SELECT DISTINCT ipInterface.ipAddr FROM ipInterface, ifServices, service, category_node, categories WHERE (( ipInterface.IPADDR <> '0.0.0.0' ) AND ( service.serviceName = 'DNS' OR service.serviceName = 'DHCP' OR categories.categoryName = 'DHCP' )) AND ifServices.ipInterfaceId = ipInterface.id AND service.serviceID = ifServices.serviceID AND ifServices.ipInterfaceId = ipInterface.id AND category_node.nodeID = ipInterface.nodeID AND categories.categoryID = category_node.categoryID AND category_node.nodeID = ipInterface.nodeID
Environment
Operating System: All
Platform: All
Acceptance / Success Criteria
None
Lucidchart Diagrams
Activity
Show:
Jeff Gehlbach July 6, 2016 at 4:39 PM
Using catinc syntax should do the trick here.
Jeff Gehlbach July 6, 2016 at 4:39 PM
Try using catinc syntax, which is super unwieldy but was added specifically to enable ORing:
You can't use it with category names that contain spaces, of course.
categoryName requirements cannot be ored with other requirements in categories.xml rules.
The following entry does not work as expected.
From categories.xml:
<category>
<label><![CDATA[DNS and DHCP Servers]]></label>
<comment>This category includes all managed interfaces which are running either DNS (name resolution) servers or DHCP servers.</comment>
<normal>99.99</normal>
<warning>97</warning>
<service>DNS</service>
<service>DHCP</service>
<rule><![CDATA[isDNS | isDHCP | categoryName == 'DHCP']]></rule>
</category>
From rtc.log:
2007-07-18 16:06:02,157 DEBUG [Main] DataManager: Category: DNS and DHCP Servers (IPADDR != '0.0.0.0') & (isDNS | isDHCP | categoryName == 'DHCP')
2007-07-18 16:06:02,158 DEBUG [Main] JdbcFilterDao: Filter: SQL statement:
SELECT DISTINCT ipInterface.ipAddr FROM ipInterface, ifServices, service, category_node, categories WHERE (( ipInterface.IPADDR <> '0.0.0.0' ) AND ( service.serviceName = 'DNS' OR service.serviceName = 'DHCP' OR categories.categoryName = 'DHCP' )) AND ifServices.ipInterfaceId = ipInterface.id AND service.serviceID = ifServices.serviceID AND ifServices.ipInterfaceId = ipInterface.id AND category_node.nodeID = ipInterface.nodeID AND categories.categoryID = category_node.categoryID AND category_node.nodeID = ipInterface.nodeID