Hi Hans,
Thanks for reporting this, this error is there since 0.7.8, I've never used Client as a match for Events, in Alarms it works ok.
I've included your fix in my code to be released with 0.8.1
Javier
Hans Peter Dittler wrote:
Hi,
after upgrading to 0.80 (great job again Javier!), my Mail-Alerts did not work anymore. I re-wrote some of my trigger rules and found that checking on "Client" did not work.
In the trace I found: 11:31:29 event 204734: T 8 - P 10 - R 16 If 'interface_client_id() = 5' (0) Stop
After some debugging in api.triggers.inc.php I found that $data given to trigger_analize did not have the element "interface_client_id" but only the element "client"
I checked with the calling module and found in api.events.inc.php at line 177
$query_select = "select /* SQL_BUFFER_RESULT HIGH_PRIORITY SQL_BIG_RESULT */ ". "<events_table>.id, <events_table>.date, hosts.name as host_name, <events_table>.host as host_id, ". "hosts.ip as host_ip, zones.shortname as zone, zones.image as zone_image, types.description as type_descript ion, ". "<events_table>.type as type_id, severity.severity, zones.id as zone_id, zones.zone as zone_name, ". "severity.level as severity_level, severity.fgcolor, severity.bgcolor, <events_table>.interface, ". "<events_table>.username as user, <events_table>.state, <events_table>.info, types.text, types.show_host, ". "<events_table>.ack, clients.name as interface_customer, interfaces.id as interface_id, ". "interfaces.client ";
To check my idea I inserted "as interface_client_id" after the "interfaces.client"
new query: $query_select = "select /* SQL_BUFFER_RESULT HIGH_PRIORITY SQL_BIG_RESULT */ ". "<events_table>.id, <events_table>.date, hosts.name as host_name, <events_table>.host as host_id, ". "hosts.ip as host_ip, zones.shortname as zone, zones.image as zone_image, types.description as type_descript ion, ". "<events_table>.type as type_id, severity.severity, zones.id as zone_id, zones.zone as zone_name, ". "severity.level as severity_level, severity.fgcolor, severity.bgcolor, <events_table>.interface, ". "<events_table>.username as user, <events_table>.state, <events_table>.info, types.text, types.show_host, ". "<events_table>.ack, clients.name as interface_customer, interfaces.id as interface_id, ". "interfaces.client as interface_client_id ";
And everything was working as expected:
19:01:35 event 204965: T 8 - P 10 - R 16 If 'interface_client_id(5) = 5' (1)
But I am not shure if this is the right place for this fix. The problem could also be changed on the other side, by changing the parameters of the roll-box selecting the field used in the trigger rule.
I hope this helps, if further details are required, please let me know.
Hans Peter Dittler
Gesch�ftsf�hrer
BRAINTEC Netzwerk-Consulting GmbH
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ jffnms-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jffnms-users
-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Javier Szyszlican, Project Leader, JFFNMS [EMAIL PROTECTED]
I hope JFFNMS or I were helpful to you, if you can, please donate at http://jffnms.org/donate
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ jffnms-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jffnms-users
