Настройка lvestats2 Уведомления по электронной почте
Форум
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Scott Neader
  2. Friday, 09 December 2016
  3.  Subscribe via email
lvestats2, email, notifications
Rate this post:
  1. 09.12.2016 13:12:12
  2. # 1
Scott Neader Accepted Answer
Posts: 89
Joined: 12.06.2014
0
Votes
Undo
To customize the admin email notifications when a user is being resource limited (fault), I am using the documentation found at https://docs.cloudlinux.com/index.html?lve-stats_2_configuration.html

I have edited /etc/sysconfig/lvestats.config/StatsNotifier.cfg to use custom values for the FROM address, and the SUBJECT of the lvestats2 email notifications:

[email protected];
NOTIFY_FROM_SUBJECT=CloudLinux alerts on server1example.com;

However, these values are being ignored. CloudLinux is still sending emails from the default server admin email address, and using a generic Subject of "Hosting account resources exceeded"

In addition, there is no documentation on how to change the TO email address. We would like these emails to go to the root email address ([email protected]) and not  the address that CloudLinux is finding (I am not sure wh ere it is looking for the email that it is using today)


Any help appreciated.

- Scott
  1. 09.12.2016 15:12:30
  2. # 2
Scott Neader Accepted Answer
Posts: 89
Joined: 12.06.2014
0
Votes
Undo
P.S. inside the file at /etc/sysconfig/lvestats.config/StatsNotifier.cfg it gives this for an example:

# You can also set next options:
# NOTIFY_FROM_EMAIL   - sender email address. For example: [email protected]

Notice that it does NOT end with a semi-colon?  That contradicts the documentation page which specifies a semi-colon at the end.  Which is right?  

In any event, I tried it with and without the semi-colon... the setting is completely ignored.

- Scott
  1. 13.12.2016 13:12:29
  2. # 3
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
Thanks for bringing our attention to this, lve-stats developers has been informed.

So far I have no news about this case.
  1. 13.12.2016 16:12:55
  2. # 4
Scott Neader Accepted Answer
Posts: 89
Joined: 12.06.2014
0
Votes
Undo
Hi Bogdan.   Actually this does work:

     [email protected]

It just takes some time for it to start working, but it does eventually work.  I also found out that it uses the same email address as the TO address.  So, the messages are changed to be FROM and TO [email protected], with this configuration change.

However, this still does NOT work:

     NOTIFY_FROM_SUBJECT=CloudLinux alerts on server1example.com; 

I would like to see this fixed.  Also, I would still like clarification... do you need a semi-colon ( ; ) at the end of the line or not.  Config file comment differs from documentation on website.

Thanks!

- Scott
  1. 19.12.2016 11:12:45
  2. # 5
Alexander Grynchuk Accepted Answer
Posts: 3
Joined: 19.12.2016
0
Votes
Undo
Hi. lve-stats-2.4-6 not support NOTIFY_FROM_SUBJECT
We will add support in future versions (LVES-598 ). NOTIFY_FROM_EMAIL need use without semi-colon ";"
--
Alexander Grynchuk  |  Python developer
  1. 19.12.2016 11:12:51
  2. # 6
Scott Neader Accepted Answer
Posts: 89
Joined: 12.06.2014
0
Votes
Undo
Thank you, Alexander.

The documentation at https://docs.cloudlinux.com/index.html?lve-stats_2_configuration.html says that NOTIFY_FROM_SUBJECT is supported. This should be removed.

Also, the same documentation says that there should be a semi-colon after the email address.  This should be fixed in the documentation as well.

- Scott
  1. 20.12.2016 06:12:25
  2. # 7
Alexander Grynchuk Accepted Answer
Posts: 3
Joined: 19.12.2016
0
Votes
Undo
Excuse me. We have the ability to customize the message subject. To do this, add the very first line in the template (/usr/share/lve/emails/en_US /usr/share/lve/emails/{admin_notify.txt,reseller_notify.txt,user_notify.txt})
Subject: CloudLinux alerts on server1example.com
In the subject line and body of the template must be two empty lines. For example (for file /usr/share/lve/emails/en_US/user_notify.txt)

Subject: CloudLinux alerts on server1example.com


Dear {{TONAME}},

Your {{DOMAIN}} web hosting account exceeded one or more of its resources within the last {{PERIOD}}.
{% if epf %}Exceeded the maximum of {{lep}} concurrent website connections. Your website was not available {{epf}} times because of this problem.
{% endif %}{% if pmemf %}Exceeded the physical memory limit of {{lpmem}}KB. Your website was not available {{pmemf}} times because of this problem.
{% endif %}{% if vmemf %}Exceeded the virtual memory limit of {{lvmem}}KB. Your website was not available {{vmemf}} times because of this problem.
{% endif %}{% if nprocf %}Exceeded the number of processes limit of {{lnproc}}. Your website was not available {{nprocf}} times because of this problem.
{% endif %}{% if cpuf %}You reached limit of {{lcpu}} of total server CPU usage {{cpuf}} times. Your website was forced to load slower to reduce its CPU usage.
{% endif %}{% if iof %}You reached limit of {{lio}}KB/s disk io rate {{iof}} times. The disk io speed for your account was slowed as a result of this problem.
{% endif %}{% if iopsf %}You reached limit of {{liops}} I/O operations {{iopsf}} times. The disk io speed for your account was slowed as a result of this problem.
{% endif %}


To view full details about your web hosting account's resource usage, including the time of each incident listed above, please click the link below and log into your cpanel hosting control panel, then click the "Resource Usage" link under the "Logs and Statistics" section.
http://{{DOMAIN}}:2083

If your account is regularly exceeding it's available resources, please consider upgrading to a higher level hosting plan that includes more resources. If you have any questions or need help with anything, just reply to this email and let us know.
Sincerely,

Your Friendly Web Hosting Support Team
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
гость
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.