PDA

View Full Version : Optimitze definition of Items / Trigger in web setup


Wolfgang
17-04-2005, 12:22
Hello,

Setting up a trigger seems to force duplicated input from the items definition.
This assumes that an item is required before a coresponding trigger can be set.

Item Definition:
Describtion: Number of processes
Host: saturn
Key: system[proccount]
Type of Information: Numeric

Trigger definition:
Describtion: Too many processes on {HOSTNAME}
Expression: {saturn:system[proccount].last(0)}>300

As you see, one has to key in "saturn:system[proccount]" in trigger again, although being defined in the required item. Also, when setting up the trigger, one has to select the host the trigger is being set, so why adding that hostname again in the expression field?

I suggest the following:
The Field Expression in the form "Trigger Configuration should be split into two parts:

"Select Item": Here you select from a combo box that refers to items of the current edited host. Example: "Number of processes"
"Expression for Item": Here you key in the expression being used on the result of the selected item. Example. "last(0)>300" (note _not_: "last(0)}>300")


This would ensure consistency between items and triggers, reduces the potentiell for misconfiguration and also allows a much easier input.

Remark: pls note also that in the current triggerdefinitionen varibale {HOSTNAME} is used for the "Describtion" but "saturn" hardcoded is being used for the "Expression" which somehow is gives no real benefit.
(I took this example from the templates provided in Version 1.1A7)

Thoughts?

Alexei
02-05-2005, 10:25
As you see, one has to key in "saturn:system[proccount]" in trigger again, although being defined in the required item. Also, when setting up the trigger, one has to select the host the trigger is being set, so why adding that hostname again in the expression field?A trigger may contain items from different hosts, that's why hostname is so important here. It cannot be skipped.

Wolfgang
02-05-2005, 20:15
After reading your answer a couple times i begun to understand ;-)

Thx.

So the way it works:
ITEMS are necessary to collect the data and put them into the database.

Then TRIGGER can access/query these data and cause the action. And this way, a TRIGGER can also use any data from any host as long as an ITEM collects the data.

Alexei
02-05-2005, 20:38
After reading your answer a couple times i begun to understand ;-)

Thx.

So the way it works:
ITEMS are necessary to collect the data and put them into the database.

Then TRIGGER can access/query these data and cause the action. And this way, a TRIGGER can also use any data from any host as long as an ITEM collects the data.Absolutely correct! :)