Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - rotame

Pages: [1]
How to / [Tutorial] Logwatch on Centos Web Panel
« on: September 05, 2018, 05:37:57 PM »
Logwatch is a utility that helps you track your system's log files, also helps you to monitor them on a schedule and email you a daily summary
To install Logwatch on CentOS / RHEL, run the following:

#yum install -y logwatch
Confing file
vi /usr/share/logwatch/default.conf/logwatch.conf

The man page describes the full list of options.

You must pay attention and  change are:

# Location of your log files
LogDir = /var/log
# You can override the default temp directory (/tmp) here
TmpDir = /var/cache/logwatch
# Change this to your email address
MailTo = root
Subject = "Logwatch for `hostname`"
# Change this to something meaningful, like your name
MailFrom = Me
# The range of report Possible values are yesterday/today/all
Range = yesterday
# Detail level of report Possible values are: Low, Medium and High.t
Detail = Low
# If you don't wish to receive the daily reports, uncomment this line
# DailyRepoty = No
# Services to monitor
services = all

THE CRONTAB NOT LOCATED TO classic   crontab -l
Stored under

How to / [Tutorial] Postfix statistics via pflogsumm on Centos Web Panel
« on: September 05, 2018, 12:25:53 PM »
Pflogsumm is a log analyzer/summarizer for the Postfix MTA.  It is
designed to provide an over-view of Postfix activity, with just enough
detail to give the administrator a "heads up" for potential trouble

Pflogsumm generates summaries and, in some cases, detailed reports of
mail server traffic volumes, rejected and bounced email, and server
warnings, errors and panics.

A quick guide how to install in our Centos Web Panel  server

We install postfix-perl-scripts package.
# yum -y install postfix-perl-scripts

# We make a new report  for yesterday
# perl /usr/sbin/pflogsumm -d yesterday /var/log/maillog

# Via crontab we can generate log summary and send via mail to root for yesterday
# crontab -e
# send mail log summary at AM 1:00 everyday to root
00 05 * * * perl /usr/sbin/pflogsumm -e -d yesterday /var/log/maillog | mail -s 'Postfix stats fro srv `hostname`' root

How to / [Tutorial] Installing Netdata on Centos Web Panel (Second guide )
« on: September 05, 2018, 12:17:31 PM »

One more Guide :

First we install all required packages :
# yum install zlib1g-dev uuid-dev libmnl-dev pkg-config curl gcc make autoconf autoconf-archive autogen automake python python-yaml python-mysqldb nodejs lm-sensors python-psycopg2 netcat git -y

Second we install the latest version of the Netdata from Git repository.

#git clone --depth=1 ~/netdata *

Next, change the directory to the cloned directory using the following command:

* ~/netdata is installation directory assume you want to be installed under root

#cd ~/netdata

Next, install the Netdata by running the script as shown below:

# ./

You should see the following output:

Downloading default configuration from netdata...
[/root/netdata]# curl -s -o /etc/netdata/ http://localhost:19999/netdata.conf

[/root/netdata]# mv /etc/netdata/ /etc/netdata/netdata.conf

 OK  New configuration saved for you to edit at /etc/netdata/netdata.conf

[/root/netdata]# chown netdata /etc/netdata/netdata.conf

[/root/netdata]# chmod 0664 /etc/netdata/netdata.conf

 --- Check KSM (kernel memory deduper) ---

Memory de-duplication instructions

You have kernel memory de-duper (called Kernel Same-page Merging,
or KSM) available, but it is not currently enabled.

To enable it run:

    echo 1 >/sys/kernel/mm/ksm/run
    echo 1000 >/sys/kernel/mm/ksm/sleep_millisecs

If you enable it, you will save 40-60% of netdata memory.

 --- Check version.txt ---
 --- Check apps.plugin ---
 --- Generate ---
 --- Basic netdata instructions ---

netdata by default listens on all IPs on port 19999,
so you can access it with:


To stop netdata run:

  systemctl stop netdata

To start netdata run:

  systemctl start netdata

Uninstall script generated: ./
Update script generated   : ./ can work from cron. It will trigger an email from cron
only if it fails (it does not print anything when it can update netdata).
Run this to automatically check and install netdata updates once per day:

sudo ln -s /root/netdata/ /etc/cron.daily/netdata-updater

 --- We are done! ---

  |.-.   .-.   .-.   .-.   .-.   .  netdata                          .-.   .-
  |   '-'   '-'   '-'   '-'   '-'   is installed and running now!  -'   '-'

  enjoy real-time performance and health monitoring...

[root@srv netdata]# systemctl start netdata
[root@srv netdata]# systemctl status netdata
netdata.service - Real time performance monitoring
   Loaded: loaded (/etc/systemd/system/netdata.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2018-09-05 13:05:10 CEST; 15s ago
  Process: 21297 ExecStartPre=/bin/chown -R netdata:netdata /var/cache/netdata (code=exited, status=0/SUCCESS)
  Process: 21295 ExecStartPre=/bin/mkdir -p /var/cache/netdata (code=exited, status=0/SUCCESS)
 Main PID: 21299 (netdata)
   CGroup: /system.slice/netdata.service
           21299 /usr/sbin/netdata -P /run/netdata/ -D
           21317 bash /usr/libexec/netdata/plugins.d/ 1
           21329 /usr/bin/python /usr/libexec/netdata/plugins.d/python.d.plugin 1
           21331 /usr/libexec/netdata/plugins.d/apps.plugin 1

Sep 05 13:05:10 systemd[1]: Starting Real time performance monitoring...
Sep 05 13:05:10 systemd[1]: Started Real time performance monitoring.

By default, Netdata default configuration file located at /etc/netdata/netdata.conf. Now, open the file and change the server loopback address to your server's IP address.
sudo nano /etc/netdata/netdata.conf

Make the following changes:
        run as user = netdata
        web files owner = root
        web files group = root
        # Netdata is not designed to be exposed to potentially hostile
        # networks.See
        bind socket to IP = xx.xx.x.xx

Save and close the file, then restart Netdata service to apply the changes:

#systemctl restart netdata

You can check the status of Netdata with the following command:
#systemctl status netdata

Finally add port to firewall
Netdata runs on port 19999, so you will need to allow port 19999 OUTGOING TCP connections

Pages: [1]