PDA

View Full Version : Host Condition in Actions configuration


Valerie
06-04-2006, 22:35
Hi,
I am pretty sure there is a bug with the Host="somehost" condition when setting an action to be taken uppon a trigger.
has anyone investigated a solution?

elkor
06-04-2006, 22:51
it works for me, I did uncover a potential problem with action conditions though detailed in another post in this forum.

Valerie
06-04-2006, 22:57
Hi Elkor,
Yeah I read your post on the other thread, right after submitting mine.

From what i understood, I should use host groups combined with host for action configuration?

elkor
06-04-2006, 23:01
I have an action defined with only Host= on it. it's working when the trigger state changes.

my issue was more complex and had to do with host groups in the conditions and the host in question not belonging to any groups.

in short (too late, I know :rolleyes: ) an action with simply Host=yourhost should work (provided yourhost has items and triggers).

Valerie
06-04-2006, 23:06
Here is the test I've made

Set an action with conditions:
Trigger Value = On
Host = "Antia"

Then I made it so a trigger would be raised for system "Wd2013993".
And I received an email anyways, from the action mentionned above.

I've made several other tests, and ended with conclusion that Host = "somehost" is not a working condition.

elkor
06-04-2006, 23:16
You're right.

I just did a test and recieved 2 alerts when I should have only recieved 1.

something odd is going on here and it could have a big impact on a rollout schedule unless it can be corrected easily.

Alexei, any way we can have somebody take a look at this?

Alexei
07-04-2006, 08:39
Hi all,

The issue will be re-tested and, if needed, fixed today.

I'll keep you informed.

elkor
07-04-2006, 14:46
Thanks Alexei!

Valerie
10-04-2006, 19:59
Hi,

Has an answer/correction to this problem been found?

Thanks

Alexei
11-04-2006, 13:52
The problem has been fixed. CVS updated.

Here is the fix, file zabbix/src/zabbix_server/actions.c:

else if(condition->conditiontype == CONDITION_TYPE_HOST)
{
ret = FAIL;


Add the "ret = FAIL;" to make it work.

elkor
11-04-2006, 14:40
Thanks! I'll test and recompile now.

err... recompile then test ;-)

elkor
11-04-2006, 15:38
OK, that seemed to work. (although I did not see the change in the sourceforge public CVS)

it doesn't address the issue detailed here (http://www.zabbix.com/forum/showthread.php?t=2475) though. However, hat is relatively minor compared to this and it can be worked around.

do you want me to submit the other bug on sourceforge? or have you fixed it already as you were in this module..

Valerie
11-04-2006, 16:44
Yup this solved my problem
Thanks a lot Alexei