Eric,

    Thanks for the quick reply.   This will work for me, I think.   It
looks like:

1.   If an event clears, it is removed from the status table
2.   If it not yet acknowledged, the eventState is 0
3.   If it has been acknowledged, the eventState is set to 1

So, the following gets me all current unacknowledged events:
select device, component from status where eventState = 0 and device <>
'linux' and device <> 'zenoss';

(the linux and zenoss parts get rid of localhost (linux) and zenoss
(program) errors)

+------------+-----------+
| device     | component |
+------------+-----------+
| HT28107D1  | NULL      |

This returns in my case a half dozen items - as it turns out, they are all
component "NULL".   Tracking this down, they are WMI permission denied
events.    No problem, but I would like to filter them out.

(Note: WMI should probably not set component to NULL?)

So, I tried:
mysql> select device, component from status where eventState = 0 and
device <> 'linux' and device <> 'zenoss' and component <> 'NULL';
+------------+-----------+
| device     | component |
+------------+-----------+
| HT28107D1  | NULL      |

No luck, and I have used up my sql skills.... Any suggestions?




You could use an external query to the MySQL database to determine if 
there are any events matching your criteria for failure.  You want to 
use the status table in the "events" database.

-Eric

[EMAIL PROTECTED] wrote:
> How (or can I?) do I set up Zenoss to execute a script on a failure
> detection?
>
> IE  - I want my Zenoss server to turn on a light for critical failures.
> It helps my help desk to be aware of the issue late at night.   The
light
> is controlled by a serial port module (X10).
>
> How would I get zenoss to run the external command?
>
> Or - alternatively - I already have a syslog filter that will do this -
> how would I get Zenoss to write device or event information to syslog?
>
>   
This e-mail message is intended only for the personal use of the recipient(s) 
named above. If you are not an intended recipient, you may not review, copy or 
distribute this message. If you have received this communication in error, 
please notify the Hearst Service Center ([EMAIL PROTECTED]) immediately by 
email and delete the original message.
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to