Krzysztof Piotr Oledzki | 8d06b8b | 2009-10-04 14:32:53 +0200 | [diff] [blame] | 1 | /* |
| 2 | include/types/counters.h |
| 3 | This file contains structure declarations for statistics counters. |
| 4 | |
| 5 | Copyright 2008-2009 Krzysztof Piotr Oledzki <ole@ans.pl> |
| 6 | |
| 7 | This library is free software; you can redistribute it and/or |
| 8 | modify it under the terms of the GNU Lesser General Public |
| 9 | License as published by the Free Software Foundation, version 2.1 |
| 10 | exclusively. |
| 11 | |
| 12 | This library is distributed in the hope that it will be useful, |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | Lesser General Public License for more details. |
| 16 | |
| 17 | You should have received a copy of the GNU Lesser General Public |
| 18 | License along with this library; if not, write to the Free Software |
| 19 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | */ |
| 21 | |
| 22 | #ifndef _TYPES_COUNTERS_H |
| 23 | #define _TYPES_COUNTERS_H |
| 24 | |
| 25 | struct pxcounters { |
| 26 | unsigned int feconn_max, beconn_max; /* max # of active frontend and backend sessions */ |
| 27 | |
Willy Tarreau | d9b587f | 2010-02-26 10:05:55 +0100 | [diff] [blame] | 28 | long long cum_fe_req; /* cumulated number of processed HTTP requests */ |
Willy Tarreau | b36b424 | 2010-06-04 20:59:39 +0200 | [diff] [blame] | 29 | long long cum_feconn, cum_fesess; /* cumulated number of received/accepted connections */ |
| 30 | long long cum_beconn, cum_lbconn; /* cumulated number of sessions processed by load balancing */ |
Krzysztof Piotr Oledzki | 8d06b8b | 2009-10-04 14:32:53 +0200 | [diff] [blame] | 31 | |
Willy Tarreau | d9b587f | 2010-02-26 10:05:55 +0100 | [diff] [blame] | 32 | unsigned int fe_rps_max; /* maximum of new sessions per second seen on the frontend */ |
Willy Tarreau | b36b424 | 2010-06-04 20:59:39 +0200 | [diff] [blame] | 33 | unsigned int fe_cps_max; /* maximum of new connections per second received on the frontend */ |
| 34 | unsigned int fe_sps_max; /* maximum of new sessions per second accepted on the frontend */ |
Willy Tarreau | ac68c5d | 2009-10-04 23:12:44 +0200 | [diff] [blame] | 35 | unsigned int be_sps_max; /* maximum of new sessions per second seen on the backend */ |
| 36 | unsigned int nbpend_max; /* max number of pending connections with no server assigned yet */ |
| 37 | |
Krzysztof Piotr Oledzki | 8d06b8b | 2009-10-04 14:32:53 +0200 | [diff] [blame] | 38 | long long bytes_in; /* number of bytes transferred from the client to the server */ |
| 39 | long long bytes_out; /* number of bytes transferred from the server to the client */ |
| 40 | |
| 41 | long long denied_req, denied_resp; /* blocked requests/responses because of security concerns */ |
| 42 | long long failed_req; /* failed requests (eg: invalid or timeout) */ |
Willy Tarreau | 2799e98 | 2010-06-05 15:43:21 +0200 | [diff] [blame] | 43 | long long denied_conn; /* denied connection requests (tcp-req rules) */ |
Krzysztof Piotr Oledzki | 8d06b8b | 2009-10-04 14:32:53 +0200 | [diff] [blame] | 44 | |
Krzysztof Piotr Oledzki | 5fb1882 | 2009-10-13 21:14:09 +0200 | [diff] [blame] | 45 | union { |
| 46 | struct { |
Willy Tarreau | 2465779 | 2010-02-26 10:30:28 +0100 | [diff] [blame] | 47 | long long rsp[6]; /* http response codes */ |
Krzysztof Piotr Oledzki | 5fb1882 | 2009-10-13 21:14:09 +0200 | [diff] [blame] | 48 | } http; |
Willy Tarreau | 2465779 | 2010-02-26 10:30:28 +0100 | [diff] [blame] | 49 | } fe, be; /* FE and BE stats */ |
Krzysztof Piotr Oledzki | 5fb1882 | 2009-10-13 21:14:09 +0200 | [diff] [blame] | 50 | |
Krzysztof Piotr Oledzki | 8d06b8b | 2009-10-04 14:32:53 +0200 | [diff] [blame] | 51 | long long failed_conns, failed_resp; /* failed connect() and responses */ |
Willy Tarreau | ae52678 | 2010-03-04 20:34:23 +0100 | [diff] [blame] | 52 | long long cli_aborts, srv_aborts; /* aborted responses during DATA phase due to client or server */ |
Krzysztof Piotr Oledzki | 8d06b8b | 2009-10-04 14:32:53 +0200 | [diff] [blame] | 53 | long long retries, redispatches; /* retried and redispatched connections */ |
| 54 | }; |
| 55 | |
| 56 | struct licounters { |
| 57 | unsigned int conn_max; /* max # of active listener sessions */ |
| 58 | |
Willy Tarreau | b36b424 | 2010-06-04 20:59:39 +0200 | [diff] [blame] | 59 | long long cum_conn; /* cumulated number of received connections */ |
| 60 | long long cum_sess; /* cumulated number of accepted sessions */ |
Krzysztof Piotr Oledzki | 8d06b8b | 2009-10-04 14:32:53 +0200 | [diff] [blame] | 61 | |
| 62 | long long bytes_in; /* number of bytes transferred from the client to the server */ |
| 63 | long long bytes_out; /* number of bytes transferred from the server to the client */ |
| 64 | |
| 65 | long long denied_req, denied_resp; /* blocked requests/responses because of security concerns */ |
| 66 | long long failed_req; /* failed requests (eg: invalid or timeout) */ |
Willy Tarreau | 2799e98 | 2010-06-05 15:43:21 +0200 | [diff] [blame] | 67 | long long denied_conn; /* denied connection requests (tcp-req rules) */ |
Krzysztof Piotr Oledzki | 8d06b8b | 2009-10-04 14:32:53 +0200 | [diff] [blame] | 68 | }; |
| 69 | |
| 70 | struct srvcounters { |
Willy Tarreau | ac68c5d | 2009-10-04 23:12:44 +0200 | [diff] [blame] | 71 | unsigned int cur_sess_max; /* max number of currently active sessions */ |
| 72 | unsigned int nbpend_max; /* max number of pending connections reached */ |
| 73 | unsigned int sps_max; /* maximum of new sessions per second seen on this server */ |
| 74 | |
Krzysztof Piotr Oledzki | 8d06b8b | 2009-10-04 14:32:53 +0200 | [diff] [blame] | 75 | long long cum_sess; /* cumulated number of sessions really sent to this server */ |
| 76 | long long cum_lbconn; /* cumulated number of sessions directed by load balancing */ |
| 77 | |
| 78 | long long bytes_in; /* number of bytes transferred from the client to the server */ |
| 79 | long long bytes_out; /* number of bytes transferred from the server to the client */ |
| 80 | |
| 81 | long long failed_conns, failed_resp; /* failed connect() and responses */ |
Willy Tarreau | ae52678 | 2010-03-04 20:34:23 +0100 | [diff] [blame] | 82 | long long cli_aborts, srv_aborts; /* aborted responses during DATA phase due to client or server */ |
Krzysztof Piotr Oledzki | 8d06b8b | 2009-10-04 14:32:53 +0200 | [diff] [blame] | 83 | long long retries, redispatches; /* retried and redispatched connections */ |
| 84 | long long failed_secu; /* blocked responses because of security concerns */ |
| 85 | |
Krzysztof Piotr Oledzki | 5fb1882 | 2009-10-13 21:14:09 +0200 | [diff] [blame] | 86 | union { |
| 87 | struct { |
Willy Tarreau | 2465779 | 2010-02-26 10:30:28 +0100 | [diff] [blame] | 88 | long long rsp[6]; /* http response codes */ |
Krzysztof Piotr Oledzki | 5fb1882 | 2009-10-13 21:14:09 +0200 | [diff] [blame] | 89 | } http; |
| 90 | } p; |
| 91 | |
Krzysztof Piotr Oledzki | 97f07b8 | 2009-12-15 22:31:24 +0100 | [diff] [blame] | 92 | long long failed_checks, failed_hana; /* failed health checks and health analyses */ |
| 93 | long long down_trans; /* up->down transitions */ |
Krzysztof Piotr Oledzki | 8d06b8b | 2009-10-04 14:32:53 +0200 | [diff] [blame] | 94 | }; |
| 95 | |
| 96 | #endif /* _TYPES_COUNTERS_H */ |
| 97 | |
| 98 | /* |
| 99 | * Local variables: |
| 100 | * c-indent-level: 8 |
| 101 | * c-basic-offset: 8 |
| 102 | * End: |
| 103 | */ |