The action component has a flaw which would really needs to be fixed now that Reactor is eol. Double quotes put in the command are omitted when the command is running. THis results in weird results, as spaces in the macro will result in the argument treated as different arguments.
When using a macro such a %servicestatustext%, it is very possible that this macro contains special characters such as backticks, double and single quotes, greater and lesser then chars etc. I have a workaround that works for some chars by adding double @ and then replacing it by double quotes
For example:
A possible alert generating problems:
Code: Select all
error 18945 MSCRMKeyGenerator: The CrmKeyGenerator encountered an error generating/monitoring key type System.Data.SqlClient.SqlException (0x80131904): Transaction (Process ID 181) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObjCode: Select all
/usr/local/nagios/libexec/daf_rundeck_curl.sh -Arg "-hostname %host% -hostalias @@%hostalias%@@ -infragroup SB-Systeem -servicecurrentattempt %servicecurrentattempt% -servicelastcheck @@%servicelastcheck%@@ -servicename @@%service%@@ -servicestateid %servicestateid% -servicestatustext @@%servicestatustext%@@" -J "ffb6023a-9c8e-49ed-a5rc-2870f092ace"Grtz
Willem