]> arthur.barton.de Git - netdata.git/blob - python.d/README.md
7df6e3e8689d1f8b6ff705cdfbbf9cba9275dd46
[netdata.git] / python.d / README.md
1 # Disclaimer
2
3 Every module should be compatible with python2 and python3.
4 All third party libraries should be installed system-wide or in `python_modules` directory.
5 Module configurations are written in YAML and **pyYAML is required**.
6
7 Every configuration file must have one of two formats:
8
9 - Configuration for only one job:
10
11 ```yaml
12 update_every : 2 # update frequency
13 retries      : 1 # how many failures in update() is tolerated
14 priority     : 20000 # where it is shown on dashboard
15
16 other_var1   : bla  # variables passed to module
17 other_var2   : alb
18 ```
19
20 - Configuration for many jobs (ex. mysql):
21
22 ```yaml
23 # module defaults:
24 update_every : 2
25 retries      : 1
26 priority     : 20000
27
28 local:  # job name
29   update_every : 5 # job update frequency
30   other_var1   : some_val # module specific variable
31
32 other_job: 
33   priority     : 5 # job position on dashboard
34   retries      : 20 # job retries
35   other_var2   : val # module specific variable
36 ```
37
38 `update_every`, `retries`, and `priority` are always optional.
39
40 ---
41
42 The following python.d modules are supported:
43
44 # apache
45
46 This module will monitor one or more apache servers depending on configuration. 
47
48 **Requirements:**
49  * apache with enabled `mod_status`
50
51 It produces the following charts:
52
53 1. **Requests** in requests/s
54  * requests
55
56 2. **Connections**
57  * connections
58
59 3. **Async Connections**
60  * keepalive
61  * closing
62  * writing
63  
64 4. **Bandwidth** in kilobytes/s
65  * sent
66  
67 5. **Workers**
68  * idle
69  * busy
70  
71 6. **Lifetime Avg. Requests/s** in requests/s
72  * requests_sec
73  
74 7. **Lifetime Avg. Bandwidth/s** in kilobytes/s
75  * size_sec
76  
77 8. **Lifetime Avg. Response Size** in bytes/request
78  * size_req
79
80 ### configuration
81
82 Needs only `url` to server's `server-status?auto`
83
84 Here is an example for 2 servers:
85
86 ```yaml
87 update_every : 10
88 priority     : 90100
89
90 local:
91   url      : 'http://localhost/server-status?auto'
92   retries  : 20
93
94 remote:
95   url          : 'http://www.apache.org/server-status?auto'
96   update_every : 5
97   retries      : 4
98 ```
99
100 Without configuration, module attempts to connect to `http://localhost/server-status?auto`
101
102 ---
103
104 # apache_cache
105
106 Module monitors apache mod_cache log and produces only one chart:
107
108 **cached responses** in percent cached
109  * hit
110  * miss
111  * other
112  
113 ### configuration
114
115 Sample:
116
117 ```yaml
118 update_every : 10
119 priority     : 120000
120 retries      : 5
121 log_path     : '/var/log/apache2/cache.log'
122 ```
123
124 If no configuration is given, module will attempt to read log file at `/var/log/apache2/cache.log`
125
126 ---
127
128 # bind_rndc
129
130 Module parses bind dump file to collect real-time performance metrics
131
132 **Requirements:**
133  * Version of bind must be 9.6 +
134  * Netdata must have permissions to run `rndc status`
135
136 It produces:
137
138 1. **Name server statistics**
139  * requests
140  * responses
141  * success
142  * auth_answer
143  * nonauth_answer
144  * nxrrset
145  * failure
146  * nxdomain
147  * recursion
148  * duplicate
149  * rejections
150  
151 2. **Incoming queries**
152  * RESERVED0
153  * A
154  * NS
155  * CNAME
156  * SOA
157  * PTR
158  * MX
159  * TXT
160  * X25
161  * AAAA
162  * SRV
163  * NAPTR
164  * A6
165  * DS
166  * RSIG
167  * DNSKEY
168  * SPF
169  * ANY
170  * DLV
171  
172 3. **Outgoing queries**
173  * Same as Incoming queries
174
175
176 ### configuration
177
178 Sample:
179
180 ```yaml
181 local:
182   named_stats_path       : '/var/log/bind/named.stats'
183 ```
184
185 If no configuration is given, module will attempt to read named.stats file  at `/var/log/bind/named.stats`
186
187 ---
188
189 # cpufreq
190
191 This module shows the current CPU frequency as set by the cpufreq kernel
192 module.
193
194 **Requirement:**
195 You need to have `CONFIG_CPU_FREQ` and (optionally) `CONFIG_CPU_FREQ_STAT`
196 enabled in your kernel.
197
198 This module tries to read from one of two possible locations. On
199 initialization, it tries to read the `time_in_state` files provided by
200 cpufreq\_stats. If this file does not exist, or doesn't contain valid data, it
201 falls back to using the more inaccurate `scaling_cur_freq` file (which only
202 represents the **current** CPU frequency, and doesn't account for any state
203 changes which happen between updates).
204
205 It produces one chart with multiple lines (one line per core).
206
207 ### configuration
208
209 Sample:
210
211 ```yaml
212 sys_dir: "/sys/devices"
213 ```
214
215 If no configuration is given, module will search for cpufreq files in `/sys/devices` directory.
216 Directory is also prefixed with `NETDATA_HOST_PREFIX` if specified.
217
218 ---
219
220 # cpuidle
221
222 This module monitors the usage of CPU idle states.
223
224 **Requirement:**
225 Your kernel needs to have `CONFIG_CPU_IDLE` enabled.
226
227 It produces one stacked chart per CPU, showing the percentage of time spent in
228 each state.
229
230 ---
231
232 # dovecot
233
234 This module provides statistics information from dovecot server. 
235 Statistics are taken from dovecot socket by executing `EXPORT global` command.
236 More information about dovecot stats can be found on [project wiki page.](http://wiki2.dovecot.org/Statistics)
237
238 **Requirement:**
239 Dovecot unix socket with R/W permissions for user netdata or dovecot with configured TCP/IP socket.
240  
241 Module gives information with following charts:
242
243 1. **sessions**
244  * active sessions
245
246 2. **logins**
247  * logins
248
249 3. **commands** - number of IMAP commands 
250  * commands
251  
252 4. **Faults**
253  * minor
254  * major
255  
256 5. **Context Switches** 
257  * volountary
258  * involountary
259  
260 6. **disk** in bytes/s
261  * read
262  * write
263  
264 7. **bytes** in bytes/s
265  * read
266  * write
267  
268 8. **number of syscalls** in syscalls/s
269  * read
270  * write
271
272 9. **lookups** - number of lookups per second
273  * path
274  * attr
275
276 10. **hits** - number of cache hits 
277  * hits
278
279 11. **attempts** - authorization attemts
280  * success
281  * failure
282
283 12. **cache** - cached authorization hits
284  * hit
285  * miss
286  
287 ### configuration
288
289 Sample:
290
291 ```yaml
292 localtcpip:
293   name     : 'local'
294   host     : '127.0.0.1'
295   port     : 24242
296
297 localsocket:
298   name     : 'local'
299   socket   : '/var/run/dovecot/stats'
300 ```
301
302 If no configuration is given, module will attempt to connect to dovecot using unix socket localized in `/var/run/dovecot/stats`
303
304 ---
305
306 # elasticsearch
307
308 Module monitor elasticsearch performance and health metrics
309
310 It produces:
311
312 1. **Search performance** charts:
313  * Number of queries, fetches
314  * Time spent on queries, fetches
315  * Query and fetch latency
316
317 2. **Indexing performance** charts:
318  * Number of documents indexed, index refreshes, flushes
319  * Time spent on indexing, refreshing, flushing
320  * Indexing and flushing latency
321
322 3. **Memory usage and garbace collection** charts:
323  * JVM heap currently in use, commited
324  * Count of garbage collections
325  * Time spent on garbage collections
326
327 4. **Host metrics** charts:
328  * Available file descriptors in percent 
329  * Opened HTTP connections
330  * Cluster communication transport metrics
331
332 5. **Queues and rejections** charts:
333  * Number of queued/rejected threads in thread pool
334
335 6. **Fielddata cache** charts:
336  * Fielddata cache size
337  * Fielddata evictions and circuit breaker tripped count
338
339 7. **Cluster health API** charts:
340  * Cluster status
341  * Nodes and tasks statistics
342  * Shards statistics
343
344 8. **Cluster stats API** charts:
345  * Nodes statistics
346  * Query cache statistics
347  * Docs statistics
348  * Store statistics
349  * Indices and shards statistics
350
351 ### configuration
352
353 Sample:
354
355 ```yaml
356 local:
357   host               :  'ipaddress'   # Server ip address or hostname
358   port               : 'password'     # Port on which elasticsearch listed
359   cluster_health     :  True/False    # Calls to cluster health elasticsearch API. Enabled by default.
360   cluster_stats      :  True/False    # Calls to cluster stats elasticsearch API. Enabled by default.
361 ```
362
363 If no configuration is given, module will fail to run.
364
365 ---
366
367 # exim
368
369 Simple module executing `exim -bpc` to grab exim queue. 
370 This command can take a lot of time to finish its execution thus it is not recommended to run it every second.
371
372 It produces only one chart:
373
374 1. **Exim Queue Emails**
375  * emails
376
377 Configuration is not needed.
378
379 ---
380
381 # fail2ban
382
383 Module monitor fail2ban log file to show all bans for all active jails 
384
385 **Requirements:**
386  * fail2ban.log file MUST BE readable by netdata (A good idea is to add  **create 0640 root netdata** to fail2ban conf at logrotate.d)
387  
388 It produces one chart with multiple lines (one line per jail)
389  
390 ### configuration
391
392 Sample:
393
394 ```yaml
395 local:
396  log_path: '/var/log/fail2ban.log'
397  conf_path: '/etc/fail2ban/jail.local'
398  exclude: 'dropbear apache'
399 ```
400 If no configuration is given, module will attempt to read log file at `/var/log/fail2ban.log` and conf file at `/etc/fail2ban/jail.local`.
401 If conf file is not found default jail is `ssh`.
402
403 ---
404
405 # freeradius
406
407 Uses the `radclient` command to provide freeradius statistics. It is not recommended to run it every second.
408
409 It produces:
410
411 1. **Authentication counters:**
412  * access-accepts
413  * access-rejects
414  * auth-dropped-requests
415  * auth-duplicate-requests
416  * auth-invalid-requests
417  * auth-malformed-requests
418  * auth-unknown-types
419
420 2. **Accounting counters:** [optional]
421  * accounting-requests
422  * accounting-responses
423  * acct-dropped-requests
424  * acct-duplicate-requests
425  * acct-invalid-requests
426  * acct-malformed-requests
427  * acct-unknown-types
428
429 3. **Proxy authentication counters:** [optional]
430  * proxy-access-accepts
431  * proxy-access-rejects
432  * proxy-auth-dropped-requests
433  * proxy-auth-duplicate-requests
434  * proxy-auth-invalid-requests
435  * proxy-auth-malformed-requests
436  * proxy-auth-unknown-types
437
438 4. **Proxy accounting counters:** [optional]
439  * proxy-accounting-requests
440  * proxy-accounting-responses
441  * proxy-acct-dropped-requests
442  * proxy-acct-duplicate-requests
443  * proxy-acct-invalid-requests
444  * proxy-acct-malformed-requests
445  * proxy-acct-unknown-typesa
446
447
448 ### configuration
449
450 Sample:
451
452 ```yaml
453 local:
454   host       : 'localhost'
455   port       : '18121'
456   secret     : 'adminsecret'
457   acct       : False # Freeradius accounting statistics.
458   proxy_auth : False # Freeradius proxy authentication statistics. 
459   proxy_acct : False # Freeradius proxy accounting statistics.
460 ```
461
462 **Freeradius server configuration:**
463
464 The configuration for the status server is automatically created in the sites-available directory.
465 By default, server is enabled and can be queried from every client. 
466 FreeRADIUS will only respond to status-server messages, if the status-server virtual server has been enabled.
467
468 To do this, create a link from the sites-enabled directory to the status file in the sites-available directory:
469  * cd sites-enabled
470  * ln -s ../sites-available/status status
471
472 and restart/reload your FREERADIUS server.
473
474 ---
475
476 # haproxy
477
478 Module monitors frontend and backend metrics such as bytes in, bytes out, sessions current, sessions in queue current.
479 And health metrics such as backend servers status (server check should be used).
480
481 Plugin can obtain data from url **OR** unix socket.
482
483 **Requirement:**
484 Socket MUST be readable AND writable by netdata user.
485
486 It produces:
487
488 1. **Frontend** family charts
489  * Kilobytes in/s 
490  * Kilobytes out/s
491  * Sessions current
492  * Sessions in queue current
493
494 2. **Backend** family charts
495  * Kilobytes in/s 
496  * Kilobytes out/s
497  * Sessions current
498  * Sessions in queue current
499
500 3. **Health** chart
501  * number of failed servers for every backend (in DOWN state)
502
503
504 ### configuration
505
506 Sample:
507
508 ```yaml
509 via_url:
510   user       : 'username' # ONLY IF stats auth is used
511   pass       : 'password' # # ONLY IF stats auth is used
512   url     : 'http://ip.address:port/url;csv;norefresh'
513 ```
514
515 OR
516
517 ```yaml
518 via_socket:
519   socket       : 'path/to/haproxy/sock'
520 ```
521
522 If no configuration is given, module will fail to run.
523
524 ---
525
526 # hddtemp
527  
528 Module monitors disk temperatures from one or more hddtemp daemons.
529
530 **Requirement:**
531 Running `hddtemp` in daemonized mode with access on tcp port
532
533 It produces one chart **Temperature** with dynamic number of dimensions (one per disk)
534
535 ### configuration
536
537 Sample:
538
539 ```yaml
540 update_every: 3
541 host: "127.0.0.1"
542 port: 7634
543 ```
544
545 If no configuration is given, module will attempt to connect to hddtemp daemon on `127.0.0.1:7634` address
546
547 ---
548
549 # IPFS
550
551 Module monitors [IPFS](https://ipfs.io) basic information.
552
553 1. **Bandwidth** in kbits/s
554  * in
555  * out
556  
557 2. **Peers**
558  * peers
559  
560 ### configuration
561
562 Only url to IPFS server is needed. 
563
564 Sample:
565
566 ```yaml
567 localhost:
568   name : 'local'
569   url  : 'http://localhost:5001'
570 ```
571
572 ---
573
574 # isc_dhcpd
575
576 Module monitor leases database to show all active leases for given pools.
577
578 **Requirements:**
579  * dhcpd leases file MUST BE readable by netdata
580  * pools MUST BE in CIDR format
581
582 It produces:
583
584 1. **Pools utilization** Aggregate chart for all pools.
585  * utilization in percent
586
587 2. **Total leases**
588  * leases (overall number of leases for all pools)
589  
590 3. **Active leases** for every pools
591   * leases (number of active leases in pool)
592
593   
594 ### configuration
595
596 Sample:
597
598 ```yaml
599 local:
600   leases_path       : '/var/lib/dhcp/dhcpd.leases'
601   pools       : '192.168.3.0/24 192.168.4.0/24 192.168.5.0/24'
602 ```
603
604 In case of python2 you need to  install `py2-ipaddress` to make plugin work.
605 The module will not work If no configuration is given.
606
607 ---
608
609
610 # mdstat
611
612 Module monitor /proc/mdstat
613
614 It produces:
615
616 1. **Health** Number of failed disks in every array (aggregate chart).
617  
618 2. **Disks stats** 
619  * total (number of devices array ideally would have)
620  * inuse (number of devices currently are in use)
621
622 3. **Current status**
623  * resync in percent
624  * recovery in percent
625  * reshape in percent
626  * check in percent
627  
628 4. **Operation status** (if resync/recovery/reshape/check is active)
629  * finish in minutes
630  * speed in megabytes/s
631   
632 ### configuration
633 No configuration is needed.
634
635 ---
636
637 # memcached
638
639 Memcached monitoring module. Data grabbed from [stats interface](https://github.com/memcached/memcached/wiki/Commands#stats).
640
641 1. **Network** in kilobytes/s
642  * read
643  * written
644  
645 2. **Connections** per second
646  * current
647  * rejected
648  * total
649  
650 3. **Items** in cluster
651  * current
652  * total
653  
654 4. **Evicted and Reclaimed** items
655  * evicted
656  * reclaimed
657  
658 5. **GET** requests/s
659  * hits
660  * misses
661
662 6. **GET rate** rate in requests/s
663  * rate
664
665 7. **SET rate** rate in requests/s
666  * rate
667  
668 8. **DELETE** requests/s
669  * hits
670  * misses
671
672 9. **CAS** requests/s
673  * hits
674  * misses
675  * bad value
676  
677 10. **Increment** requests/s
678  * hits
679  * misses
680  
681 11. **Decrement** requests/s
682  * hits
683  * misses
684  
685 12. **Touch** requests/s
686  * hits
687  * misses
688  
689 13. **Touch rate** rate in requests/s
690  * rate
691  
692 ### configuration
693
694 Sample:
695
696 ```yaml
697 localtcpip:
698   name     : 'local'
699   host     : '127.0.0.1'
700   port     : 24242
701 ```
702
703 If no configuration is given, module will attempt to connect to memcached instance on `127.0.0.1:11211` address.
704
705 ---
706
707 # mongodb
708
709 Module monitor mongodb performance and health metrics
710
711 **Requirements:**
712  * `python-pymongo` package.
713
714 You need to install it manually.
715
716
717 Number of charts depends on mongodb version, storage engine and other features (replication):
718
719 1. **Read requests**:
720  * query
721  * getmore (operation the cursor executes to get additional data from query)
722
723 2. **Write requests**:
724  * insert
725  * delete
726  * update
727
728 3. **Active clients**:
729  * readers (number of clients with read operations in progress or queued)
730  * writers (number of clients with write operations in progress or queued)
731
732 4. **Journal transactions**:
733  * commits (count of transactions that have been written to the journal)
734
735 5. **Data written to the journal**:
736  * volume (volume of data)
737
738 6. **Background flush** (MMAPv1):
739  * average ms (average time taken by flushes to execute)
740  * last ms (time taken by the last flush)
741
742 8. **Read tickets** (WiredTiger):
743  * in use (number of read tickets in use)
744  * available (number of available read tickets remaining)
745
746 9. **Write tickets** (WiredTiger):
747  * in use (number of write tickets in use)
748  * available (number of available write tickets remaining)
749
750 10. **Cursors**:
751  * opened (number of cursors currently opened by MongoDB for clients)
752  * timedOut (number of cursors that have timed)
753  * noTimeout (number of open cursors with timeout disabled)
754
755 11. **Connections**:
756  * connected (number of clients currently connected to the database server)
757  * unused (number of unused connections available for new clients)
758
759 12. **Memory usage metrics**:
760  * virtual
761  * resident (amount of memory used by the database process)
762  * mapped
763  * non mapped
764
765 13. **Page faults**:
766  * page faults (number of times MongoDB had to request from disk)
767
768 14. **Cache metrics** (WiredTiger):
769  * percentage of bytes currently in the cache (amount of space taken by cached data)
770  * percantage of tracked dirty bytes in the cache (amount of space taken by dirty data)
771
772 15. **Pages evicted from cache** (WiredTiger):
773  * modified
774  * unmodified
775
776 16. **Queued requests**:
777  * readers (number of read request currently queued)
778  * writers (number of write request currently queued)
779
780 17. **Errors**:
781  * msg (number of message assertions raised)
782  * warning (number of warning assertions raised)
783  * regular (number of regular assertions raised)
784  * user (number of assertions corresponding to errors generated by users)
785
786 18. **Storage metrics** (one chart for every database)
787  * dataSize (size of all documents + padding in the database)
788  * indexSize (size of all indexes in the database)
789  * storageSize (size of all extents in the database)
790
791 19. **Documents in the database** (one chart for all databases)
792  * documents (number of objects in the database among all the collections)
793
794 20. **tcmalloc metrics**
795  * central cache free
796  * current total thread cache
797  * pageheap free
798  * pageheap unmapped
799  * thread cache free
800  * transfer cache free
801  * heap size
802
803 21. **Commands total/failed rate**
804  * count
805  * createIndex
806  * delete
807  * eval
808  * findAndModify
809  * insert
810
811 22. **Locks metrics** (acquireCount metrics - number of times the lock was acquired in the specified mode)
812  * Global lock
813  * Database lock
814  * Collection lock
815  * Metadata lock
816  * oplog lock
817
818 23. **Replica set members state**
819  * state
820
821 24. **Oplog window**
822   * window (interval of time between the oldest and the latest entries in the oplog)
823
824 25. **Replication lag**
825   * member (time when last entry from the oplog was applied for every member)
826
827 26. **Replication set member heartbeat latency**
828   * member (time when last heartbeat was received from replica set member)
829
830
831 ### configuration
832
833 Sample:
834
835 ```yaml
836 local:
837     name : 'local'
838     host : '127.0.0.1'
839     port : 27017
840     user : 'netdata'
841     pass : 'netdata'
842
843 ```
844
845 If no configuration is given, module will attempt to connect to mongodb daemon on `127.0.0.1:27017` address
846
847 ---
848
849
850 # mysql
851
852 Module monitors one or more mysql servers
853
854 **Requirements:**
855  * python library [MySQLdb](https://github.com/PyMySQL/mysqlclient-python) (faster) or [PyMySQL](https://github.com/PyMySQL/PyMySQL) (slower)
856
857 It will produce following charts (if data is available):
858
859 1. **Bandwidth** in kbps
860  * in
861  * out
862
863 2. **Queries** in queries/sec
864  * queries
865  * questions
866  * slow queries
867
868 3. **Operations** in operations/sec
869  * opened tables
870  * flush
871  * commit
872  * delete
873  * prepare
874  * read first
875  * read key
876  * read next
877  * read prev
878  * read random
879  * read random next
880  * rollback
881  * save point
882  * update
883  * write
884
885 4. **Table Locks** in locks/sec
886  * immediate
887  * waited
888
889 5. **Select Issues** in issues/sec
890  * full join
891  * full range join
892  * range
893  * range check
894  * scan
895
896 6. **Sort Issues** in issues/sec
897  * merge passes
898  * range
899  * scan
900
901 ### configuration
902
903 You can provide, per server, the following:
904
905 1. username which have access to database (deafults to 'root')
906 2. password (defaults to none)
907 3. mysql my.cnf configuration file
908 4. mysql socket (optional)
909 5. mysql host (ip or hostname)
910 6. mysql port (defaults to 3306)
911
912 Here is an example for 3 servers:
913
914 ```yaml
915 update_every : 10
916 priority     : 90100
917 retries      : 5
918
919 local:
920   'my.cnf'   : '/etc/mysql/my.cnf'
921   priority   : 90000
922
923 local_2:
924   user     : 'root'
925   pass : 'blablablabla'
926   socket   : '/var/run/mysqld/mysqld.sock'
927   update_every : 1
928
929 remote:
930   user     : 'admin'
931   pass : 'bla'
932   host     : 'example.org'
933   port     : 9000
934   retries  : 20
935 ```
936
937 If no configuration is given, module will attempt to connect to mysql server via unix socket at `/var/run/mysqld/mysqld.sock` without password and with username `root`
938
939 ---
940
941 # nginx
942
943 This module will monitor one or more nginx servers depending on configuration. Servers can be either local or remote. 
944
945 **Requirements:**
946  * nginx with configured 'ngx_http_stub_status_module'
947  * 'location /stub_status'
948
949 Example nginx configuration can be found in 'python.d/nginx.conf'
950
951 It produces following charts:
952
953 1. **Active Connections**
954  * active
955
956 2. **Requests** in requests/s
957  * requests
958
959 3. **Active Connections by Status**
960  * reading
961  * writing
962  * waiting
963  
964 4. **Connections Rate** in connections/s
965  * accepts
966  * handled
967  
968 ### configuration
969
970 Needs only `url` to server's `stub_status`
971
972 Here is an example for local server:
973
974 ```yaml
975 update_every : 10
976 priority     : 90100
977
978 local:
979   url     : 'http://localhost/stub_status'
980   retries : 10
981 ```
982
983 Without configuration, module attempts to connect to `http://localhost/stub_status`
984
985 ---
986
987 # nsd
988
989 Module uses the `nsd-control stats_noreset` command to provide `nsd` statistics.
990
991 **Requirements:**
992  * Version of `nsd` must be 4.0+
993  * Netdata must have permissions to run `nsd-control stats_noreset`
994
995 It produces:
996
997 1. **Queries**
998  * queries
999
1000 2. **Zones**
1001  * master
1002  * slave
1003
1004 3. **Protocol**
1005  * udp
1006  * udp6
1007  * tcp
1008  * tcp6
1009
1010 4. **Query Type**
1011  * A
1012  * NS
1013  * CNAME
1014  * SOA
1015  * PTR
1016  * HINFO
1017  * MX
1018  * NAPTR
1019  * TXT
1020  * AAAA
1021  * SRV
1022  * ANY
1023
1024 5. **Transfer**
1025  * NOTIFY
1026  * AXFR
1027
1028 6. **Return Code**
1029  * NOERROR
1030  * FORMERR
1031  * SERVFAIL
1032  * NXDOMAIN
1033  * NOTIMP
1034  * REFUSED
1035  * YXDOMAIN
1036
1037
1038 Configuration is not needed.
1039
1040 ---
1041
1042 # ovpn_status_log
1043
1044 Module monitor openvpn-status log file. 
1045
1046 **Requirements:**
1047
1048  * If you are running multiple OpenVPN instances out of the same directory, MAKE SURE TO EDIT DIRECTIVES which create output files
1049  so that multiple instances do not overwrite each other's output files.
1050
1051  * Make sure NETDATA USER CAN READ openvpn-status.log
1052
1053  * Update_every interval MUST MATCH interval on which OpenVPN writes operational status to log file.
1054  
1055 It produces:
1056
1057 1. **Users** OpenVPN active users
1058  * users
1059  
1060 2. **Traffic** OpenVPN overall bandwidth usage in kilobit/s
1061  * in
1062  * out
1063  
1064 ### configuration
1065
1066 Sample:
1067
1068 ```yaml
1069 default
1070  log_path     : '/var/log/openvpn-status.log'
1071 ```
1072
1073 ---
1074
1075 # phpfpm
1076
1077 This module will monitor one or more php-fpm instances depending on configuration. 
1078
1079 **Requirements:**
1080  * php-fpm with enabled `status` page
1081  * access to `status` page via web server
1082  
1083 It produces following charts:
1084
1085 1. **Active Connections**
1086  * active
1087  * maxActive
1088  * idle
1089
1090 2. **Requests** in requests/s
1091  * requests
1092  
1093 3. **Performance**
1094  * reached
1095  * slow
1096  
1097 ### configuration
1098
1099 Needs only `url` to server's `status`
1100  
1101 Here is an example for local instance:
1102
1103 ```yaml
1104 update_every : 3
1105 priority     : 90100
1106
1107 local:
1108   url     : 'http://localhost/status'
1109   retries : 10
1110 ```
1111
1112 Without configuration, module attempts to connect to `http://localhost/status`
1113
1114 ---
1115
1116 # postfix
1117
1118 Simple module executing `postfix -p` to grab postfix queue.
1119
1120 It produces only two charts:
1121
1122 1. **Postfix Queue Emails**
1123  * emails
1124  
1125 2. **Postfix Queue Emails Size** in KB
1126  * size
1127
1128 Configuration is not needed.
1129
1130 ---
1131
1132 # postgres
1133
1134 Module monitors one or more postgres servers.
1135
1136 **Requirements:**
1137
1138  * `python-psycopg2` package. You have to install to manually.
1139
1140 Following charts are drawn:
1141
1142 1. **Database size** MB
1143  * size
1144
1145 2. **Current Backend Processes** processes
1146  * active
1147
1148 3. **Write-Ahead Logging Statistics** files/s
1149  * total
1150  * ready
1151  * done
1152
1153 4. **Checkpoints** writes/s
1154  * scheduled
1155  * requested
1156  
1157 5. **Current connections to db** count
1158  * connections
1159  
1160 6. **Tuples returned from db** tuples/s
1161  * sequential
1162  * bitmap
1163
1164 7. **Tuple reads from db** reads/s
1165  * disk
1166  * cache
1167
1168 8. **Transactions on db** transactions/s
1169  * commited
1170  * rolled back
1171
1172 9. **Tuples written to db** writes/s
1173  * inserted
1174  * updated
1175  * deleted
1176  * conflicts
1177
1178 10. **Locks on db** count per type
1179  * locks
1180  
1181 ### configuration
1182
1183 ```yaml
1184 socket:
1185   name         : 'socket'
1186   user         : 'postgres'
1187   database     : 'postgres'
1188
1189 tcp:
1190   name         : 'tcp'
1191   user         : 'postgres'
1192   database     : 'postgres'
1193   host         : 'localhost'
1194   port         : 5432
1195 ```
1196
1197 When no configuration file is found, module tries to connect to TCP/IP socket: `localhost:5432`.
1198
1199 ---
1200
1201 # redis
1202
1203 Get INFO data from redis instance.
1204
1205 Following charts are drawn:
1206
1207 1. **Operations** per second
1208  * operations
1209
1210 2. **Hit rate** in percent
1211  * rate
1212
1213 3. **Memory utilization** in kilobytes
1214  * total
1215  * lua
1216
1217 4. **Database keys** 
1218  * lines are creates dynamically based on how many databases are there
1219  
1220 5. **Clients**
1221  * connected
1222  * blocked
1223  
1224 6. **Slaves**
1225  * connected
1226  
1227 ### configuration
1228
1229 ```yaml
1230 socket:
1231   name     : 'local'
1232   socket   : '/var/lib/redis/redis.sock'
1233
1234 localhost:
1235   name     : 'local'
1236   host     : 'localhost'
1237   port     : 6379
1238 ```
1239
1240 When no configuration file is found, module tries to connect to TCP/IP socket: `localhost:6379`.
1241
1242 ---
1243
1244 # sensors
1245
1246 System sensors information.
1247
1248 Charts are created dynamically.
1249
1250 ### configuration
1251
1252 For detailed configuration information please read [`sensors.conf`](https://github.com/firehol/netdata/blob/master/conf.d/python.d/sensors.conf) file.
1253
1254 ---
1255
1256 # squid
1257
1258 This module will monitor one or more squid instances depending on configuration.
1259
1260 It produces following charts:
1261
1262 1. **Client Bandwidth** in kilobits/s
1263  * in
1264  * out
1265  * hits
1266
1267 2. **Client Requests** in requests/s
1268  * requests
1269  * hits
1270  * errors
1271
1272 3. **Server Bandwidth** in kilobits/s
1273  * in
1274  * out
1275  
1276 4. **Server Requests** in requests/s
1277  * requests
1278  * errors
1279  
1280 ### configuration
1281
1282 ```yaml
1283 priority     : 50000
1284
1285 local:
1286   request : 'cache_object://localhost:3128/counters'
1287   host    : 'localhost'
1288   port    : 3128
1289 ```
1290
1291 Without any configuration module will try to autodetect where squid presents its `counters` data
1292  
1293 ---
1294
1295 # smartd_log
1296
1297 Module monitor `smartd` log files to collect HDD/SSD S.M.A.R.T attributes.
1298
1299 It produces following charts (you can add additional attributes in the module configuration file):
1300
1301 1. **Read Error Rate** attribute 1
1302
1303 2. **Start/Stop Count** attribute 4
1304
1305 3. **Reallocated Sectors Count** attribute 5
1306  
1307 4. **Seek Error Rate** attribute 7
1308
1309 5. **Power-On Hours Count** attribute 9
1310
1311 6. **Power Cycle Count** attribute 12
1312
1313 7. **Load/Unload Cycles** attribute 193
1314
1315 8. **Temperature** attribute 194
1316
1317 9. **Current Pending Sectors** attribute 197
1318  
1319 10. **Off-Line Uncorrectable** attribute 198
1320
1321 11. **Write Error Rate** attribute 200
1322  
1323 ### configuration
1324
1325 ```yaml
1326 local:
1327   log_path : '/var/log/smartd/'
1328 ```
1329
1330 If no configuration is given, module will attempt to read log files in /var/log/smartd/ directory.
1331  
1332 ---
1333
1334 # tomcat
1335
1336 Present tomcat containers memory utilization.
1337
1338 Charts:
1339
1340 1. **Requests** per second
1341  * accesses
1342
1343 2. **Volume** in KB/s
1344  * volume
1345
1346 3. **Threads**
1347  * current
1348  * busy
1349  
1350 4. **JVM Free Memory** in MB
1351  * jvm
1352  
1353 ### configuration
1354
1355 ```yaml
1356 localhost:
1357   name : 'local'
1358   url  : 'http://127.0.0.1:8080/manager/status?XML=true'
1359   user : 'tomcat_username'
1360   pass : 'secret_tomcat_password'
1361 ```
1362
1363 Without configuration, module attempts to connect to `http://localhost:8080/manager/status?XML=true`, without any credentials. 
1364 So it will probably fail.
1365
1366 --- 
1367
1368 # varnish cache
1369
1370 Module uses the `varnishstat` command to provide varnish cache statistics.
1371
1372 It produces:
1373
1374 1. **Client metrics**
1375  * session accepted
1376  * session dropped
1377  * good client requests received
1378
1379 2. **All history hit rate ratio**
1380  * cache hits in percent
1381  * cache miss in percent
1382  * cache hits for pass percent
1383
1384 3. **Curent poll hit rate ratio**
1385  * cache hits in percent
1386  * cache miss in percent
1387  * cache hits for pass percent
1388
1389 4. **Thread-related metrics** (only for varnish version 4+)
1390  * total number of threads
1391  * threads created
1392  * threads creation failed
1393  * threads hit max
1394  * length os session queue
1395  * sessions queued for thread
1396
1397 5. **Backend health**
1398  * backend conn. success
1399  * backend conn. not attempted
1400  * backend conn. too many
1401  * backend conn. failures
1402  * backend conn. reuses
1403  * backend conn. recycles
1404  * backend conn. retry
1405  * backend requests made
1406
1407 6. **Memory usage**
1408  * memory available in megabytes
1409  * memory allocated in megabytes
1410
1411 7. **Problems summary**
1412  * session dropped
1413  * session accept failures
1414  * session pipe overflow
1415  * backend conn. not attempted
1416  * fetch failed (all causes)
1417  * backend conn. too many
1418  * threads hit max
1419  * threads destroyed
1420  * length of session queue
1421  * HTTP header overflows
1422  * ESI parse errors
1423  * ESI parse warnings
1424
1425 8. **Uptime**
1426  * varnish instance uptime in seconds
1427
1428 ### configuration
1429
1430 No configuration is needed.
1431
1432 ---
1433
1434 # web_log
1435
1436 Tails the apache/nginx/lighttpd/gunicorn log files to collect real-time web-server statistics.
1437
1438 It produces following charts:
1439
1440 1. **Response by type** requests/s
1441  * success (1xx, 2xx, 304)
1442  * error (5xx)
1443  * redirect (3xx except 304)
1444  * bad (4xx)
1445  * other (all other responses)
1446
1447 2. **Response by code family** requests/s
1448  * 1xx (informational)
1449  * 2xx (successful)
1450  * 3xx (redirect)
1451  * 4xx (bad)
1452  * 5xx (internal server errors)
1453  * other (non-standart responses)
1454  * unmatched (the lines in the log file that are not matched)
1455
1456 3. **Detailed Response Codes** requests/s (number of responses for each response code family individually)
1457  
1458 4. **Bandwidth** KB/s
1459  * received (bandwidth of requests)
1460  * send (bandwidth of responses)
1461
1462 5. **Timings** ms (request processing time)
1463  * min (bandwidth of requests)
1464  * max (bandwidth of responses)
1465  * average (bandwidth of responses)
1466
1467 6. **Request per url** requests/s (configured by user)
1468
1469 7. **Http Methods** requests/s (requests per http method)
1470
1471 8. **Http Versions** requests/s (requests per http version)
1472
1473 9. **IP protocols** requests/s (requests per ip protocol version)
1474
1475 10. **Curent Poll Unique Client IPs** unique ips/s (unique client IPs per data collection iteration)
1476
1477 11. **All Time Unique Client IPs** unique ips/s (unique client IPs since the last restart of netdata)
1478
1479  
1480 ### configuration
1481
1482 ```yaml
1483 nginx_log:
1484   name  : 'nginx_log'
1485   path  : '/var/log/nginx/access.log'
1486
1487 apache_log:
1488   name  : 'apache_log'
1489   path  : '/var/log/apache/other_vhosts_access.log'
1490   categories:
1491       cacti : 'cacti.*'
1492       observium : 'observium'
1493 ```
1494
1495 Module has preconfigured jobs for nginx, apache and gunicorn on various distros.
1496
1497 ---