Hello,
We're trying to customize how some of our alerts work and have run into a little problem. We built off this post () and tried to do the following:
${SQL: Select CASE WHEN SUBSTRING (${Caption},2,1) = ':' THEN SUBSTRING(${Caption},1,3) ELSE ${Caption} END AS Caption}
Basically we were monitoring drive space on almost only Windows servers. Now we've added a few Linux servers and want to get the full path and didn't want to have to create a separate alert for them.
Here's the errors we get in the email.
For a caption of "/xx/xxxxxx"
MACRO SQL ERROR - Incorrect syntax near '/'.
For a caption of "C:\ some silly extra text"
Volume MACRO SQL ERROR - Incorrect syntax near 'C:'.
The label 'C' has already been declared. Label names must be unique within a query batch or stored procedure.
The label 'Label' has already been declared. Label names must be unique within a query batch or stored procedure.
The label 'C' has already been declared. Label names must be unique within a query batch or stored procedure.
The label 'Label' has already been declared. Label names must be unique within a query batch or stored procedure.
Thoughts?