Working on an alert for interface discards. This is the swql generated by the alert:
SELECT E0.[Uri], E0.[DisplayName]
FROM Orion.NPM.Interfaces AS E0
WHERE ( ( ( E0.[Node].[CustomProperties].[Alerts] = 'T' ) AND ( E0.[CustomProperties].[Alerts] = 'T' ) ) AND ( ( E0.[InErrorsDiscardsThreshold].[IsLevel1State] = 'True' ) AND ( E0.[InErrorsDiscardsThreshold].[IsLevel2State] = 'True' ) AND ( E0.[OutErrorsDiscardsThreshold].[IsLevel1State] = 'True' ) AND ( E0.[InErrorsDiscardsThreshold].[IsLevel2State] = 'True' ) ) )
When I paste that into the SWQL studio I get the error "Conversaion failed when converting the varchar value 'false' to data type int"
If I take away the Where statement the query returns and the values show up as False
Also I changed the alert to be OR because I realized it wouldn't work with an AND at all. But wanting to know changing the query to
SELECT E0.[Uri], E0.[DisplayName]
FROM Orion.NPM.Interfaces AS E0
WHERE ( ( ( E0.[Node].[CustomProperties].[Alerts] = 'T' ) AND ( E0.[CustomProperties].[Alerts] = 'T' ) ) AND ( ( E0.[InErrorsDiscardsThreshold].[IsLevel1State] = 1 ) OR ( E0.[InErrorsDiscardsThreshold].[IsLevel2State] = 1 ) OR ( E0.[OutErrorsDiscardsThreshold].[IsLevel1State] = 1 ) OR ( E0.[InErrorsDiscardsThreshold].[IsLevel2State] = 1 ) ) )
makes it work so it looks like 1 is true and 0 is false. Is this correct?