Time schedule for E-Mail notification
-
Hello,
I have 2 questions regarding e-mail alerting:
-
Is it possible to send alerts using a time-schedule?
For example it want E-Mail notification Monday-Friday to person A, on Saturday and Sunday to person B. -
How can I add values from different DCIs to one alert?
For example I have a threshold for percentage of disk usage. But in the alert message I want to see a) percentage used, b) absolutely used space (GB) and c) total amount of disk space.
Thanks in advance!!
-
-
Hi!
@lostavar said in Time schedule for E-Mail notification:
- Is it possible to send alerts using a time-schedule?
For example it want E-Mail notification Monday-Friday to person A, on Saturday and Sunday to person B.
Yes, you can create two rules with different e-mail actions, and use filtering script in each rule to match Monday-Friday or Saturday-Sunday. Script to match Monday-Friday will look like following:
sub main() { t = localtime(); return (t->wday >= 1) && (t->wday <= 5); }Best regards,
Victor - Is it possible to send alerts using a time-schedule?
-
@lostavar said in Time schedule for E-Mail notification:
- How can I add values from different DCIs to one alert?
For example I have a threshold for percentage of disk usage. But in the alert message I want to see a) percentage used, b) absolutely used space (GB) and c) total amount of disk space.
There are no easy way to achieve that - only via scripting. In message text, you can use %[..] macro, which will be substituted by value returned by given script. To use script in such macro, you should create it in script library (Control Panel -> Script Library).
In the script, you can use FindDCIByName or FindDCIByDescription and GetDCIData functions to retrieve data of some other DCIs.For example, script wchich will return total amount of disk space on root partition will look like this (assuming thet you have configured appropriate DCI):
GetDCIValue($node, FindDCIByName($node, "Disk.Total(/)"))Best regards,
Victor - How can I add values from different DCIs to one alert?
-
@victor said in Time schedule for E-Mail notification:
Hi!
@lostavar said in Time schedule for E-Mail notification:
- Is it possible to send alerts using a time-schedule?
For example it want E-Mail notification Monday-Friday to person A, on Saturday and Sunday to person B.
Yes, you can create two rules with different e-mail actions, and use filtering script in each rule to match Monday-Friday or Saturday-Sunday. Script to match Monday-Friday will look like following:
sub main() { t = localtime(); return (t->wday >= 1) && (t->wday <= 5); }Best regards,
VictorJust discovered that due to a bug attribute wday is not accessible. To fix it, replace file src/libnxsl/functions.cpp with attached one and recompile NetXMS server. If your server running on Windows, ask me and I'll post recompiled libnxsl.dll.
Best regards,
Victor
- Is it possible to send alerts using a time-schedule?
-
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login