Public | Automated Build

Last pushed: 4 days ago
Short Description
OpsMx tcollector in Docker (Dockerfile)
Full Description

OpsMx tcollector

A forked repository of official TCollector

About tcollector

tcollector is a framework to collect data points and store them in OpenTSDB.
It allows you to write simple collectors that it'll run and monitor. It also
handles the communication with the TSDs.

For more info, see the TCollector Documentation

Directory Tree

|-- collectors
|   |-- 0
|   |-- 300
|   |-- 900
|   |-- etc
|   `-- lib
|-- debian
|-- eos
|   `-- collectors
|-- rpm
`-- stumbleupon

The Config files

The Config files are located in tcollector/collectors/etc/

  1. related to opsmx collectors configurations.(The following fields need to specify in

    • GLOBAL_COLLECTORS_INTERVAL - Used to apply unique time interval for all collectors
    • OVERRIDE - Used to override script's collection interval time to GLOBAL_COLLECTORS_INTERVAL. i.e When OVERRIDE is True, GLOBAL_COLLECTORS_INTERVAL is applied to all collectors which means every collectors has same unique time interval period
    • SERVICES Dictionary - Select the servicies(specify True) that needs to monitor i.e. Retrives CPU and MEM of the service
    • APACHE_CONFIG Dictionary - Specify username, password and base url like http://localhost, if you wish to monitor apache web server
    • MYSQL_CONFIG Dictionary - Specify username, password ,ip and port to get mysql metrics. If you want to get more metrics, please set True for extended field
    • POSTGRESS_CONFIG Dictionary - Related to postgress DB, in order to get postgress metrics, specify username, password, db, ip, port

    • Most of the configurations is enough, but we need specify port(TSDB PORT),host(TSDB HOST). If necessary set True for http &ssl

Select which collectors should run

Go to tcollector/collectors/0/, give execute permissions to the collectors that you want to be run.

For example:
chmod +x

How to download and start?

1. MANUALL download and MANUALL start

Clone the repository

git clone

You should specify host and port in tcollecor/collectors/etc/ and go to tcollectordirectory(root of the tcollectors) run


If you did not specify host and port in tcollecor/collectors/etc/, you can specify host and port as command line argument

python -H <HOST IP> -p <PORT>

2. Download and install as init script

In this step, host and port are already configured, but you need to select which scripts should run by chmod +x <collector name> in tcollector/collectors/0/

sudo wget -O && chmod +x && sh

service tcollector start
service tcollector stop
service tcollector restart
service tcollector uninstall

tcollector in Docker

docker pull opsmx11/tcollector

docker run --net=host --volume=/var/lib/docker/:/var/lib/docker:ro --volume=/sys/fs/cgroup/:/sys/fs/cgroup/:ro -it --name=opsmx-collector -d opsmx11/tcollector

Docker Pull Command
Source Repository

Comments (0)