I had this idea of writing a zabbix agent simulator I could use to test our triggers / alerting. Basically the agent would forward all requests to a real zabbix agent except the test subject which could be configured to return any series of values to simulate a crash/peak/whatever. Does something like that already exist?
I could hack together a small script tailored to my needs, but I was wondering if others are interested, so maybe it would be worth the effort to make this thing even somewhat configurable and userfriendly
.
Anyway, here is my brainstorm so far , I'd appreciate some comments on the idea.
I could hack together a small script tailored to my needs, but I was wondering if others are interested, so maybe it would be worth the effort to make this thing even somewhat configurable and userfriendly
. Anyway, here is my brainstorm so far , I'd appreciate some comments on the idea.
Code:
- General Features: * Interactive Mode (over telnet? or just local command line) -> we don't want to write a config file for every new test * Act as zabbix agent "proxy" (forward requests to a real agent except the testsubject) -> events look like as if they came from the real host - Per key config: * return ZBX_NOTSUPPORTED * forward to real agent * use a "ValueEngine" (a something that chooses a value range based upon configuration) - ValueEngines * permanent (fixed valuerange) * timed peak (fixed value range, choose another valuerange after x seconds/requests/at specified time), then go back - Valueranges * fixed value (text, int, float) * random value between x and y (int, float) * random value of array [...] (text, int, float) * iterate over array [...] ) (text,int, float)
Comment