Re: Passing Parameters to Event Handlers
Stanley Hopcroft <[email protected]>
| Newsgroups | gmane.network.netsaint.user |
|---|---|
| Message-ID | <[email protected]> |
Dear Sir, Is the command you wish to be performed as your event handler defined in command.cfg ? I am using global event handlers (with other macro parameters) without any problems. command[global-host-handler]=$USER1$/global_host_handler $TIMET$ $HOSTNAME$ $HOSTSTATE$ $STATETYPE$ command[global-svc-handler]=$USER1$/global_svc_handler $TIMET$ $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATE$ $STATETYPE$ '$OUTPUT$' If it's not working you could consider enabling the appropriate debug option (rebuilding Netsaint with the compile time debug switch, DEBUG3) and potentially sending a bug report However, the docco clearly distinguishes between commands used in services (with parms etc) and those used in event handlers. It may be that it is __not__ possible. You can find out for sure by running it in the foreground (no -d) in the debugger breaking at the local event handler and displaying the processed command line. I really can't see why it doesn't, since process_macros is called in run_service_handler and this expands $ARG1$ etc. Yours sincerely. -- ------------------------------------------------------------------------ Stanley Hopcroft ------------------------------------------------------------------------ '...No man is an island, entire of itself; every man is a piece of the continent, a part of the main. If a clod be washed away by the sea, Europe is the less, as well as if a promontory were, as well as if a manor of thy friend's or of thine own were. Any man's death diminishes me, because I am involved in mankind; and therefore never send to know for whom the bell tolls; it tolls for thee...' from Meditation 17, J Donne. ------------------------------------------------------- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html