@@ -4,15 +4,14 @@ Hello World Example
44
55A minimal example to see sqlalchemy-collectd do something.
66
7-
87Step One - Run collectd as a console app
98========================================
109
1110In one terminal window, run collectd as an interactive application with
1211the -f flag::
1312
14- # cd examples/helloworld
15- # collectd -f -C collectdconsole.conf
13+ # cd examples/helloworld
14+ # collectd -f -C collectdconsole.conf
1615
1716The ``collectdconsole.conf `` includes a relative path to the
1817sqlalchemy-collectd checkout as the module path.
@@ -23,28 +22,39 @@ Step Two - Run the demo program
2322This program uses a SQLite database for starters. It spins up
2423five processes with 20 threads each::
2524
26- # python run_queries.py
25+ # python run_queries.py
2726
2827Step Three - watch collectd console
2928===================================
3029
3130Output looks something like::
3231
33- $ collectd -f -C collectdconsole.conf
34- [2018-02-11 18:29:35] plugin_load: plugin "logfile" successfully loaded.
35- [2018-02-11 18:29:35] [info] plugin_load: plugin "write_log" successfully loaded.
36- [2018-02-11 18:29:35] [info] plugin_load: plugin "python" successfully loaded.
37- [2018-02-11 18:29:35] [info] sqlalchemy_collectd plugin version 0.0.1
38- [2018-02-11 18:29:35] [info] Python version: 3.6.4 (default, Jan 23 2018, 22:28:37)
39- [GCC 7.2.1 20170915 (Red Hat 7.2.1-2)]
40- [2018-02-11 18:29:35] [info] Initialization complete, entering read-loop.
41- [2018-02-11 18:29:45] [info] write_log values:
42- [{"values":[0],"dstypes":["gauge"],"dsnames":["value"],"time":1518391784.793,"interval":10.000,"host":"photon2","plugin":"sqlalchemy","plugin_instance":"run_queries.py","type":"count","type_instance":"checkedin"}]
43- [2018-02-11 18:29:45] [info] write_log values:
44- [{"values":[0],"dstypes":["gauge"],"dsnames":["value"],"time":1518391784.793,"interval":10.000,"host":"photon2","plugin":"sqlalchemy","plugin_instance":"run_queries.py","type":"count","type_instance":"detached"}]
45- [2018-02-11 18:29:45] [info] write_log values:
46- [{"values":[6],"dstypes":["gauge"],"dsnames":["value"],"time":1518391784.793,"interval":10.000,"host":"photon2","plugin":"sqlalchemy","plugin_instance":"run_queries.py","type":"count","type_instance":"numprocs"}]
47- [2018-02-11 18:29:45] [info] write_log values:
48- [{"values":[6],"dstypes":["gauge"],"dsnames":["value"],"time":1518391784.793,"interval":10.000,"host":"photon2","plugin":"sqlalchemy","plugin_instance":"run_queries.py","type":"count","type_instance":"numpools"}]
49- [2018-02-11 18:29:45] [info] write_log values:
50- [{"values":[28],"dstypes":["gauge"],"dsnames":["value"],"time":1518391784.793,"interval":10.000,"host":"photon2","plugin":"sqlalchemy","plugin_instance":"host","type":"count","type_instance":"checkedout"}]
32+ $ collectd -f -C collectdconsole.conf
33+ [2018-02-11 18:29:35] plugin_load: plugin "logfile" successfully loaded.
34+ [2018-02-11 18:29:35] [info] plugin_load: plugin "write_log" successfully loaded.
35+ [2018-02-11 18:29:35] [info] plugin_load: plugin "python" successfully loaded.
36+ [2018-02-11 18:29:35] [info] sqlalchemy_collectd plugin version 0.0.1
37+ [2018-02-11 18:29:35] [info] Python version: 3.6.4 (default, Jan 23 2018, 22:28:37)
38+ [GCC 7.2.1 20170915 (Red Hat 7.2.1-2)]
39+ [2018-02-11 18:29:35] [info] Initialization complete, entering read-loop.
40+ [2018-02-11 18:29:45] [info] write_log values:
41+ [{"values":[0],"dstypes":["gauge"],"dsnames":["value"],"time":1518391784.793,"interval":10.000,"host":"photon2","plugin":"sqlalchemy","plugin_instance":"run_queries.py","type":"count","type_instance":"checkedin"}]
42+ [2018-02-11 18:29:45] [info] write_log values:
43+ [{"values":[0],"dstypes":["gauge"],"dsnames":["value"],"time":1518391784.793,"interval":10.000,"host":"photon2","plugin":"sqlalchemy","plugin_instance":"run_queries.py","type":"count","type_instance":"detached"}]
44+ [2018-02-11 18:29:45] [info] write_log values:
45+ [{"values":[6],"dstypes":["gauge"],"dsnames":["value"],"time":1518391784.793,"interval":10.000,"host":"photon2","plugin":"sqlalchemy","plugin_instance":"run_queries.py","type":"count","type_instance":"numprocs"}]
46+ [2018-02-11 18:29:45] [info] write_log values:
47+ [{"values":[6],"dstypes":["gauge"],"dsnames":["value"],"time":1518391784.793,"interval":10.000,"host":"photon2","plugin":"sqlalchemy","plugin_instance":"run_queries.py","type":"count","type_instance":"numpools"}]
48+ [2018-02-11 18:29:45] [info] write_log values:
49+ [{"values":[28],"dstypes":["gauge"],"dsnames":["value"],"time":1518391784.793,"interval":10.000,"host":"photon2","plugin":"sqlalchemy","plugin_instance":"host","type":"count","type_instance":"checkedout"}]
50+
51+ Step Four - Try out Connmon
52+ ===========================
53+
54+ The **connmon ** console client is an optional feature that connects to the
55+ SQLAlchemy-collectd plugin running inside the collectd server to print live
56+ stats. Once the above steps are all running, try out the client::
57+
58+ # connmon
59+
60+
0 commit comments