Tag: Monitoring

  • How to install zabbix agent on Ubuntu

    How to install zabbix agent on Ubuntu

    To install the Zabbix agent on Ubuntu, run the command

    apt install zabbix-agent
    

    To autostart, Zabbix agent on boot, enable it with

    systemctl enable zabbix-agent
    

    To manage Zabbix, use commands

    systemctl stop zabbix-agent
    systemctl start zabbix-agent
    systemctl restart zabbix-agent
    

    To see Zabbix listening port

    netstat -lntp | grep zabbix
    

    Zabbix agent port

    Edit file

    vi /etc/zabbix/zabbix_agentd.conf 
    

    Find

    Server=127.0.0.1
    

    Replace with

    Server=127.0.0.1,IP_OF_ZABBIX_SERVER_HERE
    

    zabbix agent Server config

    Restart zabbix agent

    systemctl restart zabbix-agent
    

    After the Zabbix agent is installed, you need to add the sevrer in your Zabbix installation.

  • Restart Apache if failed

    This bash script check web site every 5 minutes, restart the web server if web site is not responding.

    Create a file

    mkdir /usr/serverok
    vi /usr/serverok/check_httpd.sh
    

    Add

    #!/bin/bash
    # Author: Yujin Boby
    # Web: https://serverok.in
    # Email: [email protected]
    
    /usr/bin/wget --tries=1 --timeout=30 -O /dev/null https://YOUR_DOMAIN.EXTN/
    
    if [ $? -ne 0 ]; then
        systemctl restart httpd
        datetime=`date "+%Y%m%d %H:%M:%S"`
        echo $datetime "failure">>/var/log/sok-web.log
    fi
    

    In above code, replace https://YOUR_DOMAIN.EXTN/ with your sites actual url.

    Make it executable

    chmod 755 /usr/serverok/check_httpd.sh
    

    Create a cronjob

    crontab -e
    

    Add

    */5 * * * *  /usr/serverok/check_httpd.sh > /dev/null 2>&1
    

    See Server Monitoring

  • Percona Monitoring and Management

    Percona Monitoring and Management is an Open Source monitoring software for MySQL, PostgreSQL and MongoDB.

    https://www.percona.com/software/database-tools/percona-monitoring-and-management

    It is based on grafana and node_exporter. You can see source code at

    https://github.com/percona/pmm

    Install instructions for Percona Monitoring and Management available at

    https://www.percona.com/software/pmm/quickstart

    See MySQL

  • Employee Monitoring Software

    Veyon

    It is Open Source software. Source code available from github. It is written in C++. It is creted for class room monitoring, can be used for office monitoring too.

    https://veyon.io/

    ActivTrak

    Free Plan offers 3 USERS / 3GB DATA STORAGE. Agent available for Windows, Mac and Google Chrome.

    https://activtrak.com