HomeConfiguring AgentLinux, FreeBSD & Mac
Linux, FreeBSD & Mac

The Agent will use the Config file for :

  • Configuring the device key to determine the Nodelizer – Server device – with which your server’s metrics will be associated.
  • Additional settings like – Logging level and Log file location … etc
  • Configuring the variable(s) for additional services (Apache, MySQL,…etc) which will be used by agent to read and send metrics to Nodelizer server.

The location of the config file is :

  • For (deb/rpm)package supported Linux distros
    • /etc/rptmonitor/config.cfg
  • For few other Linux distro, FreeBSD 8+ & Mac OS X+
    • /usr/local/bin/rptmonitor/config.cfg
Basic configuring :-
Required
  • device_key : The device key as unique identifier for server is provided in the Web app under the Manage Servers menu in Device Key column beside ‘IP Address’… In-case of manual installation, fill in your device_key for server identification. (Also check out below for optional parameters if you wish to configure.)
    device_key: abCd4F5gh

    Restart rptmonitor service, after editing the config file.

    • For deb/rpm package supported Linux distros :
      • sudo /etc/init.d/rptmonitor restart
      • OR
      • sudo service rptmonitor restart
    • For openSUSE(11.4+) with systemd :
      • sudo systemctl start rptmonitor.service
    • For other Linux distro, FreeBSD8+ and Mac OS X+ :
      • sudo python /usr/local/bin/rptmonitor/monitor.py restart

Optional (make sure you restart the agent after editing config file)
  • # Set postdata preference

    Secure HTTP Connection(https) will be established by default while posting data. To switch to http, specify the value for variable ‘https_conn’ as no or false.

    # Set postdata preference

    https_conn: yes

  • # Set logging level

    The agent will log warnings and errors by default but if the agent is not reporting data for any particular metric then you can set log_level to debug mode which will log all the details to be helpful in troubleshooting. Available log level options are : debug, info, warn, error.

    #log_level: info

    To

    log_level: info

    or

    log_level: debug

  • # Log file location

    Uncomment this option and change the directory location if you wish to save your logs in another location.

    #logfile_directory: /var/log/rptmonitor/

    to

    logfile_directory: /var/log/rptmonitor/

    Default location to save logs :

    • For deb/rpm package supported Linux distros

      /var/log/rptmonitor/

    • For other Linux distro, FreeBSD 8+, Mac OS X+

      /tmp/

  • # Pid file location

    pidfile_directory :- Default location to save PID file:

    #pidfile_directory: /var/run/rptmonitor/

    to

    pidfile_directory: /var/run/rptmonitor/

    • For deb/rpm package supported Linux distros

      /var/run/rptmonitor/

    • For other Linux distro, FreeBSD 8+, Mac OS X+

      /tmp/

Configuring Additional Services :-

For monitoring below mentioned additional services, just remove comment(# symbol) before config variable(s) & restart the agent to let it read and send collected data to Nodelizer server.

Note :
If you have configured any additional service(s) using container system like docker, MAKE SURE your containers are restarted / running after your machine is been restarted automatically or manually whenever. Otherwise your application data graph will have no recent data to display. You may get “Service down” alert if you have configured for the service(s).

  • Apache, MySQL, Memcached, Nginx, Lighttpd, MongoDB, PostgreSQL, Mailserver (postfix / sendmail / exim / qmail / zimbra), Tomcat, PHP-FPM, Redis, Docker, Jenkins, Elasticsearch, Varnish
    (Leave the related lines commented for the service you do not wish to monitor.)
  • # Apache

    apache_status_url :- Apache status output URL

    apache_usrnm :- Apache status username, in-case it’s protected

    apache_pswd :- Apache status password, in-case it’s protected

    # MySQL

    mysql_server :- MySQL server address

    mysql_usrnm :- MySQL user

    mysql_pswd :- MySQL password

    mysql_port :- Custom port for MySQL connection(Default – 3306)

    mysql_socket :- Custom MySQL socket

    mysql_replication :- To enable replication check,

    # Memcached

    memcached_server :- Memcached server address

    memcached_port :- Custom port for Memcached connection(Default – 11211)

    # Nginx

    nginx_status_url :- Nginx status page URL

    nginx_usrnm :- Nginx status username, in-case it’s protected

    nginx_pswd :- Nginx status password, in-case it’s protected

    # Lighttpd

    lighttpd_status_url :- Lighttpd status page URL

    lighttpd_usrnm :- Lighttpd status username, in-case it’s protected

    lighttpd_pswd :- Lighttpd status password, in-case it’s protected

    # MongoDB

    mongodb_server :- MongoDB server address

    mongodb_port :- Custom port for MongoDB connection(Default – 27017)

    mongodb_dbnm :- Database (Default – admin)

    mongodb_usrnm :- MongoDB user

    mongodb_pswd :- MongoDB password

    # PostgreSQL

    postgresql_server :- PostgreSQL server address

    postgresql_port :- Custom port for PostgreSQL connection(Default – 5432)

    postgresql_dbnm :- PostgreSQL database

    postgresql_usrnm :- PostgreSQL user

    postgresql_pswd :- PostgreSQL password

    # Mail Server(SMTP) (Supported: postfix, sendmail, exim, qmail, zimbra)

    mail_server :- Server Domain name

    mail_port :- Custom port for Mail-server connection(Default –25)

    mail_agent :- Mail Transfer Agent

    # Tomcat

    tomcat_status_url :- Tomcat status output URL

    tomcat_usrnm :- Tomcat status username

    tomcat_pswd :- Tomcat status password

    # PHP-FPM

    phpfpm_status_url_1 :- PHP-FPM status page URL (status URL is pool-specific)

    phpfpm_usrnm_1 :- PHP-FPM status username, in case it’s protected

    phpfpm_pswd_1 :- PHP-FPM status password, in case it’s protected

    You can monitor multiple pools :- Per new pool, add & configure the variables :

    phpfpm_status_url_n

    phpfpm_usrnm_n

    phpfpm_pswd_n

    (n = 1, 2, 3, 4……50         ‘n’ is the pool number)

    # Redis

    redis_server :- Redis server address

    redis_port :- Custom port for Redis connection(Default – 6379)

    redis_pswd :- Redis Server password, in-case it’s protected

    # Docker

    use_docker_default :- use default configuration of docker when installed (default – yes)

    (it is recommended to uncomment this to monitor docker integration)

    # Jenkins

    jenkins_srvr_port :- Jenkins URL

    jenkins_usrnm :- Jenkins username

    jenkins_pswd :- Jenkins password

    # Elasticsearch

    es_url :- Elasticsearch URL

    # Varnish

    varnishVersion :- Major version of the Varnish is required for configuration.

    (it is recommended to uncomment this to monitor Varnish integration)

Default location for logs

If your linux OS is supported by deb/rpm packages, you will find logs in

/var/log/rptmonitor/

for other OS or if Nodelizer agent is installed via source tarball then you will find logs in

/tmp/

The agent, by default, will log data at info level which also includes warnings and errors but if the agent is not reporting data for any metric then you can set log_level to debug mode which will log all the details.

#log_level: info

To

log_level: info

or

log_level: debug

The log file (in debug mode)contains valuable data about the agent’s parsing actions which can be helpful in troubleshooting.

  • log level options: debug, info, warn, error.