Hello, here is my problem. I use zenCommand to run commands periodically (by the way I graph the results). And when creating a data source which will collect the results of the command, I see that there are 4 fields that refer to an event (Component, Event Class, Event key and severity). At first I thought that it was to specify the event that would be raised should the command fail. So I tried this with the check_ping plugin shipped with Zenoss. I'm able to graph the response time, but if I shut down a machine which I run the command against, I don't get the event I had set for the command. That is odd since when I run the command manually from the command line, I get : CRITICAL : unreachable host <IpAdress> and on the graph I see an "NaN" point, so since I know that ZenCommand gets the correct result (CRITICAL instead of OK), It should generate the event I have created.
Ok, you'll probably say "Why bother with this since zenoss generates an event anyway when a device is down?". You right for a ping command, but if I want to monitor, say the size of a MySQL dumpfile, If the file is not there, I want to get an event (so that I can react : execute a command, send an alert mail to someone, ...) and not a mere "NaN" point on a graph. And more on the subject : check_ping enables you to define in the command Critical and Warning thresholds on both loss percentages and response time so that the command exits by "PING WARNING" or "PING CRITICAL" instead of "PING OK" if the thresholds are not met. (see $ check_ping --help as the zenoss user) I thought that it would too generate events. It would be very interesting since it enables me to send alerts upon diiferents criterias for each device. Well, you'll tell me that I can do that by specifying thresholds in each device templates, but that would force me to make a local copy of an otherwise global template just to specify different values to thresholds, whereas in a command I can use TALES expressions, meaning I can for the global device class /Device add custom fields (the values of the thresholds) that I can set individually for each device and use these fields in my check_ping command (see Chapter13 in the Admin Guide). That means that I have only a global template bound to all devices (better : the Class /Device), and the only thing I have to do for each device is setting different values for the custom fields. So if you've managed to get that far in my speech without being bored, here are my questions : Am I correct when I say that the event that I specified when adding my command-generated datapoint in the template should be triggered in the command fails? If not, what is the use of this event? (when does it triggers? ...) Am I correct when I say that events should be triggered according to the return state of the check_ping command as I explianed earlier? If not, how can I trigger an event according to the return state of this command? I may be repeating myself, but although all this stuff doesn't appear useful to do a simple ping check, it would be very useful to monitor something else, and Zenoss' ability to catch results from command line where we can insert TALES expressions allows us to monitor just anything for any type of device. This combined to a very evolutive modeling of devices is to my eyes the greatest advantage of Zenoss, and It would be great to be able to do what I exposed earlier. Thanks, ------------------------ Florent Gibert -------------------- m2f -------------------- Read this topic online here: http://community.zenoss.com/forums/viewtopic.php?p=8376#8376 -------------------- m2f -------------------- _______________________________________________ zenoss-users mailing list [email protected] http://lists.zenoss.org/mailman/listinfo/zenoss-users
