question

aravinth_chakravarthyr_173918 avatar image
aravinth_chakravarthyr_173918 asked Erick Ramirez answered

What language is the OpsCenter email.conf written in?

Hi

We are trying to generate email alerts from our opscenter . After editing email.conf in opscenter we found that for type ->rolling-avg we have a field metric in the trap.

ex: for alert os-disk-usage (/dev/dm_3)

we have type field in the trap as rolling avg, and metric as os-disk-usage

for some other issues like node-down we have the type field -> nodedown and the field metric is missing

we tried to include both metric and type in the trap we needed in the email. But it shows the error i have attached

and it our email.conf file is

So we are planning to write an if -else condition in email.conf

if type = rolling-avg:

type = metric

else

type = type

but we are unable to code against it as we are not sure what language is used over there.

Can you please let us know what is the language used for coding email.conf or

Is there any other way to solve this ?

opscentermonitoring
dse.png (13.2 KiB)
dse1.png (11.0 KiB)
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered

The OpsCenter email.conf file is not a program. It's just a text configuration file so you can't include conditional statements in it.

The file itself just defines the SMTP message that gets sent out by OpsCenter when an event is triggered by the monitoring service. It isn't possible to make it behave like an application so you will need to do the parsing/processing yourself at the receiving end. Cheers!

Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.