]> arthur.barton.de Git - netdata.git/blob - python.d/README.md
pretty value formatting on all alarm notifications
[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 # mysql
708
709 Module monitors one or more mysql servers
710
711 **Requirements:**
712  * python library [MySQLdb](https://github.com/PyMySQL/mysqlclient-python) (faster) or [PyMySQL](https://github.com/PyMySQL/PyMySQL) (slower)
713
714 It will produce following charts (if data is available):
715
716 1. **Bandwidth** in kbps
717  * in
718  * out
719
720 2. **Queries** in queries/sec
721  * queries
722  * questions
723  * slow queries
724
725 3. **Operations** in operations/sec
726  * opened tables
727  * flush
728  * commit
729  * delete
730  * prepare
731  * read first
732  * read key
733  * read next
734  * read prev
735  * read random
736  * read random next
737  * rollback
738  * save point
739  * update
740  * write
741
742 4. **Table Locks** in locks/sec
743  * immediate
744  * waited
745
746 5. **Select Issues** in issues/sec
747  * full join
748  * full range join
749  * range
750  * range check
751  * scan
752
753 6. **Sort Issues** in issues/sec
754  * merge passes
755  * range
756  * scan
757
758 ### configuration
759
760 You can provide, per server, the following:
761
762 1. username which have access to database (deafults to 'root')
763 2. password (defaults to none)
764 3. mysql my.cnf configuration file
765 4. mysql socket (optional)
766 5. mysql host (ip or hostname)
767 6. mysql port (defaults to 3306)
768
769 Here is an example for 3 servers:
770
771 ```yaml
772 update_every : 10
773 priority     : 90100
774 retries      : 5
775
776 local:
777   'my.cnf'   : '/etc/mysql/my.cnf'
778   priority   : 90000
779
780 local_2:
781   user     : 'root'
782   pass : 'blablablabla'
783   socket   : '/var/run/mysqld/mysqld.sock'
784   update_every : 1
785
786 remote:
787   user     : 'admin'
788   pass : 'bla'
789   host     : 'example.org'
790   port     : 9000
791   retries  : 20
792 ```
793
794 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`
795
796 ---
797
798 # nginx
799
800 This module will monitor one or more nginx servers depending on configuration. Servers can be either local or remote. 
801
802 **Requirements:**
803  * nginx with configured 'ngx_http_stub_status_module'
804  * 'location /stub_status'
805
806 Example nginx configuration can be found in 'python.d/nginx.conf'
807
808 It produces following charts:
809
810 1. **Active Connections**
811  * active
812
813 2. **Requests** in requests/s
814  * requests
815
816 3. **Active Connections by Status**
817  * reading
818  * writing
819  * waiting
820  
821 4. **Connections Rate** in connections/s
822  * accepts
823  * handled
824  
825 ### configuration
826
827 Needs only `url` to server's `stub_status`
828
829 Here is an example for local server:
830
831 ```yaml
832 update_every : 10
833 priority     : 90100
834
835 local:
836   url     : 'http://localhost/stub_status'
837   retries : 10
838 ```
839
840 Without configuration, module attempts to connect to `http://localhost/stub_status`
841
842 ---
843
844 # nginx_log
845
846 Module monitors nginx access log and produces only one chart:
847
848 1. **nginx status codes** in requests/s
849  * 2xx
850  * 3xx
851  * 4xx
852  * 5xx
853
854 ### configuration
855
856 Sample for two vhosts:
857
858 ```yaml
859 site_A:
860   path: '/var/log/nginx/access-A.log'
861
862 site_B:
863   name: 'local'
864   path: '/var/log/nginx/access-B.log'
865 ```
866
867 When no configuration file is found, module tries to parse `/var/log/nginx/access.log` file.
868
869 ---
870
871 # ovpn_status_log
872
873 Module monitor openvpn-status log file. 
874
875 **Requirements:**
876
877  * If you are running multiple OpenVPN instances out of the same directory, MAKE SURE TO EDIT DIRECTIVES which create output files
878  so that multiple instances do not overwrite each other's output files.
879
880  * Make sure NETDATA USER CAN READ openvpn-status.log
881
882  * Update_every interval MUST MATCH interval on which OpenVPN writes operational status to log file.
883  
884 It produces:
885
886 1. **Users** OpenVPN active users
887  * users
888  
889 2. **Traffic** OpenVPN overall bandwidth usage in kilobit/s
890  * in
891  * out
892  
893 ### configuration
894
895 Sample:
896
897 ```yaml
898 default
899  log_path     : '/var/log/openvpn-status.log'
900 ```
901
902 ---
903
904 # phpfpm
905
906 This module will monitor one or more php-fpm instances depending on configuration. 
907
908 **Requirements:**
909  * php-fpm with enabled `status` page
910  * access to `status` page via web server
911  
912 It produces following charts:
913
914 1. **Active Connections**
915  * active
916  * maxActive
917  * idle
918
919 2. **Requests** in requests/s
920  * requests
921  
922 3. **Performance**
923  * reached
924  * slow
925  
926 ### configuration
927
928 Needs only `url` to server's `status`
929  
930 Here is an example for local instance:
931
932 ```yaml
933 update_every : 3
934 priority     : 90100
935
936 local:
937   url     : 'http://localhost/status'
938   retries : 10
939 ```
940
941 Without configuration, module attempts to connect to `http://localhost/status`
942
943 ---
944
945 # postfix
946
947 Simple module executing `postfix -p` to grab postfix queue.
948
949 It produces only two charts:
950
951 1. **Postfix Queue Emails**
952  * emails
953  
954 2. **Postfix Queue Emails Size** in KB
955  * size
956
957 Configuration is not needed.
958
959 ---
960
961 # redis
962
963 Get INFO data from redis instance.
964
965 Following charts are drawn:
966
967 1. **Operations** per second
968  * operations
969
970 2. **Hit rate** in percent
971  * rate
972
973 3. **Memory utilization** in kilobytes
974  * total
975  * lua
976
977 4. **Database keys** 
978  * lines are creates dynamically based on how many databases are there
979  
980 5. **Clients**
981  * connected
982  * blocked
983  
984 6. **Slaves**
985  * connected
986  
987 ### configuration
988
989 ```yaml
990 socket:
991   name     : 'local'
992   socket   : '/var/lib/redis/redis.sock'
993
994 localhost:
995   name     : 'local'
996   host     : 'localhost'
997   port     : 6379
998 ```
999
1000 When no configuration file is found, module tries to connect to TCP/IP socket: `localhost:6379`.
1001
1002 ---
1003
1004 # sensors
1005
1006 System sensors information.
1007
1008 Charts are created dynamically.
1009
1010 ### configuration
1011
1012 For detailed configuration information please read [`sensors.conf`](https://github.com/firehol/netdata/blob/master/conf.d/python.d/sensors.conf) file.
1013
1014 ---
1015
1016 # squid
1017
1018 This module will monitor one or more squid instances depending on configuration.
1019
1020 It produces following charts:
1021
1022 1. **Client Bandwidth** in kilobits/s
1023  * in
1024  * out
1025  * hits
1026
1027 2. **Client Requests** in requests/s
1028  * requests
1029  * hits
1030  * errors
1031
1032 3. **Server Bandwidth** in kilobits/s
1033  * in
1034  * out
1035  
1036 4. **Server Requests** in requests/s
1037  * requests
1038  * errors
1039  
1040 ### configuration
1041
1042 ```yaml
1043 priority     : 50000
1044
1045 local:
1046   request : 'cache_object://localhost:3128/counters'
1047   host    : 'localhost'
1048   port    : 3128
1049 ```
1050
1051 Without any configuration module will try to autodetect where squid presents its `counters` data
1052  
1053 ---
1054
1055 # tomcat
1056
1057 Present tomcat containers memory utilization.
1058
1059 Charts:
1060
1061 1. **Requests** per second
1062  * accesses
1063
1064 2. **Volume** in KB/s
1065  * volume
1066
1067 3. **Threads**
1068  * current
1069  * busy
1070  
1071 4. **JVM Free Memory** in MB
1072  * jvm
1073  
1074 ### configuration
1075
1076 ```yaml
1077 localhost:
1078   name : 'local'
1079   url  : 'http://127.0.0.1:8080/manager/status?XML=true'
1080   user : 'tomcat_username'
1081   pass : 'secret_tomcat_password'
1082 ```
1083
1084 Without configuration, module attempts to connect to `http://localhost:8080/manager/status?XML=true`, without any credentials. 
1085 So it will probably fail.
1086
1087 --- 
1088
1089 # varnish cache
1090
1091 Module uses the `varnishstat` command to provide varnish cache statistics.
1092
1093 It produces:
1094
1095 1. **Client metrics**
1096  * session accepted
1097  * session dropped
1098  * good client requests received
1099
1100 2. **All history hit rate ratio**
1101  * cache hits in percent
1102  * cache miss in percent
1103  * cache hits for pass percent
1104
1105 3. **Curent poll hit rate ratio**
1106  * cache hits in percent
1107  * cache miss in percent
1108  * cache hits for pass percent
1109
1110 4. **Thread-related metrics** (only for varnish version 4+)
1111  * total number of threads
1112  * threads created
1113  * threads creation failed
1114  * threads hit max
1115  * length os session queue
1116  * sessions queued for thread
1117
1118 5. **Backend health**
1119  * backend conn. success
1120  * backend conn. not attempted
1121  * backend conn. too many
1122  * backend conn. failures
1123  * backend conn. reuses
1124  * backend conn. recycles
1125  * backend conn. retry
1126  * backend requests made
1127
1128 6. **Memory usage**
1129  * memory available in megabytes
1130  * memory allocated in megabytes
1131
1132 7. **Problems summary**
1133  * session dropped
1134  * session accept failures
1135  * session pipe overflow
1136  * backend conn. not attempted
1137  * fetch failed (all causes)
1138  * backend conn. too many
1139  * threads hit max
1140  * threads destroyed
1141  * length of session queue
1142  * HTTP header overflows
1143  * ESI parse errors
1144  * ESI parse warnings
1145
1146 8. **Uptime**
1147  * varnish instance uptime in seconds
1148
1149 ### configuration
1150
1151 No configuration is needed.
1152
1153 ---