Triggers are very flexible and allow a lot of maths/data operations.
This should be moved out into a separate object, that could be called a virtual probe.
So now you have an additional probe, which stores no data in database, but is called like a function and works the same way as a probe (aka item) and can be used wherever a probe/item can be used.
e.g.
New virtual probe called "Free space on / (%)"
Key: "diskfree[/] / disktotal[/] * 100"
This allows for two things:
- Trigger is reduced to a comparison only and just needs probe(item) or virtual probe as source, an comparison operator and a threshold value.
- virtual probes can be used in other places as datasource, e.g. in graphs.
Usage possibilities are manifold. E.g. if you have two webservers that are used in a load balancing way, you could analyze the quality of your load balancer like this:
Create virtual probe "Web Service balance"
Key: (check_service_perf[http,192.168.0.1]/(check_service_perf[http,192.168.0.1]+check_service_perf[http,192.168.0.2])-0.5)*2
Now can see the value moving to -1 if server 1 is taking it all or move to 1 if server 2 is taking it all, and otherwise it moves in between.
Many things possible. At the same time one can possibly reduce amount of real probes/aka amount of data. E.g. you don't need all three values anymore: disktotal, diskfree, diskused. You can now go with diskfree and diskused and can save some data space and request time.
This should be moved out into a separate object, that could be called a virtual probe.
So now you have an additional probe, which stores no data in database, but is called like a function and works the same way as a probe (aka item) and can be used wherever a probe/item can be used.
e.g.
New virtual probe called "Free space on / (%)"
Key: "diskfree[/] / disktotal[/] * 100"
This allows for two things:
- Trigger is reduced to a comparison only and just needs probe(item) or virtual probe as source, an comparison operator and a threshold value.
- virtual probes can be used in other places as datasource, e.g. in graphs.
Usage possibilities are manifold. E.g. if you have two webservers that are used in a load balancing way, you could analyze the quality of your load balancer like this:
Create virtual probe "Web Service balance"
Key: (check_service_perf[http,192.168.0.1]/(check_service_perf[http,192.168.0.1]+check_service_perf[http,192.168.0.2])-0.5)*2
Now can see the value moving to -1 if server 1 is taking it all or move to 1 if server 2 is taking it all, and otherwise it moves in between.
Many things possible. At the same time one can possibly reduce amount of real probes/aka amount of data. E.g. you don't need all three values anymore: disktotal, diskfree, diskused. You can now go with diskfree and diskused and can save some data space and request time.
Comment