| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | |
| 3 | package nginxvts |
| 4 | |
| 5 | import "github.com/netdata/netdata/go/plugins/plugin/framework/collectorapi" |
| 6 | |
| 7 | var mainCharts = collectorapi.Charts{ |
| 8 | { |
| 9 | ID: "requests", |
| 10 | Title: "Total requests", |
| 11 | Units: "requests/s", |
| 12 | Fam: "requests", |
| 13 | Ctx: "nginxvts.requests_total", |
| 14 | Dims: collectorapi.Dims{ |
| 15 | {ID: "connections_requests", Name: "requests", Algo: collectorapi.Incremental}, |
| 16 | }, |
| 17 | }, |
| 18 | { |
| 19 | ID: "active_connections", |
| 20 | Title: "Active connections", |
| 21 | Units: "connections", |
| 22 | Fam: "connections", |
| 23 | Ctx: "nginxvts.active_connections", |
| 24 | Dims: collectorapi.Dims{ |
| 25 | {ID: "connections_active", Name: "active"}, |
| 26 | }, |
| 27 | }, |
| 28 | { |
| 29 | ID: "connections", |
| 30 | Title: "Total connections", |
| 31 | Units: "connections/s", |
| 32 | Fam: "connections", |
| 33 | Ctx: "nginxvts.connections_total", |
| 34 | Dims: collectorapi.Dims{ |
| 35 | {ID: "connections_reading", Name: "reading", Algo: collectorapi.Incremental}, |
| 36 | {ID: "connections_writing", Name: "writing", Algo: collectorapi.Incremental}, |
| 37 | {ID: "connections_waiting", Name: "waiting", Algo: collectorapi.Incremental}, |
| 38 | {ID: "connections_accepted", Name: "accepted", Algo: collectorapi.Incremental}, |
| 39 | {ID: "connections_handled", Name: "handled", Algo: collectorapi.Incremental}, |
| 40 | }, |
| 41 | }, |
| 42 | { |
| 43 | ID: "uptime", |
| 44 | Title: "Uptime", |
| 45 | Units: "seconds", |
| 46 | Fam: "uptime", |
| 47 | Ctx: "nginxvts.uptime", |
| 48 | Dims: collectorapi.Dims{ |
| 49 | {ID: "uptime", Name: "uptime"}, |
| 50 | }, |
| 51 | }, |
| 52 | } |
| 53 | var sharedZonesCharts = collectorapi.Charts{ |
| 54 | { |
| 55 | ID: "shared_memory_size", |
| 56 | Title: "Shared memory size", |
| 57 | Units: "bytes", |
| 58 | Fam: "shared memory", |
| 59 | Ctx: "nginxvts.shm_usage", |
| 60 | Dims: collectorapi.Dims{ |
| 61 | {ID: "sharedzones_maxsize", Name: "max"}, |
| 62 | {ID: "sharedzones_usedsize", Name: "used"}, |
| 63 | }, |
| 64 | }, |
| 65 | { |
| 66 | ID: "shared_memory_used_node", |
| 67 | Title: "Number of node using shared memory", |
| 68 | Units: "nodes", |
| 69 | Fam: "shared memory", |
| 70 | Ctx: "nginxvts.shm_used_node", |
| 71 | Dims: collectorapi.Dims{ |
| 72 | {ID: "sharedzones_usednode", Name: "used"}, |
| 73 | }, |
| 74 | }, |
| 75 | } |
| 76 | |
| 77 | var serverZonesCharts = collectorapi.Charts{ |
| 78 | { |
| 79 | ID: "server_requests_total", |
| 80 | Title: "Total number of client requests", |
| 81 | Units: "requests/s", |
| 82 | Fam: "serverzones", |
| 83 | Ctx: "nginxvts.server_requests_total", |
| 84 | Dims: collectorapi.Dims{ |
| 85 | {ID: "total_requestcounter", Name: "requests", Algo: collectorapi.Incremental}, |
| 86 | }, |
| 87 | }, |
| 88 | { |
| 89 | ID: "server_responses_total", |
| 90 | Title: "Total number of responses by code class", |
| 91 | Units: "responses/s", |
| 92 | Fam: "serverzones", |
| 93 | Ctx: "nginxvts.server_responses_total", |
| 94 | Dims: collectorapi.Dims{ |
| 95 | {ID: "total_responses_1xx", Name: "1xx", Algo: collectorapi.Incremental}, |
| 96 | {ID: "total_responses_2xx", Name: "2xx", Algo: collectorapi.Incremental}, |
| 97 | {ID: "total_responses_3xx", Name: "3xx", Algo: collectorapi.Incremental}, |
| 98 | {ID: "total_responses_4xx", Name: "4xx", Algo: collectorapi.Incremental}, |
| 99 | {ID: "total_responses_5xx", Name: "5xx", Algo: collectorapi.Incremental}, |
| 100 | }, |
| 101 | }, |
| 102 | { |
| 103 | ID: "server_traffic_total", |
| 104 | Title: "Total amount of data transferred to and from the server", |
| 105 | Units: "bytes/s", |
| 106 | Fam: "serverzones", |
| 107 | Ctx: "nginxvts.server_traffic_total", |
| 108 | Dims: collectorapi.Dims{ |
| 109 | {ID: "total_inbytes", Name: "in", Algo: collectorapi.Incremental}, |
| 110 | {ID: "total_outbytes", Name: "out", Algo: collectorapi.Incremental}, |
| 111 | }, |
| 112 | }, |
| 113 | { |
| 114 | ID: "server_cache_total", |
| 115 | Title: "Total server cache", |
| 116 | Units: "events/s", |
| 117 | Fam: "serverzones", |
| 118 | Ctx: "nginxvts.server_cache_total", |
| 119 | Dims: collectorapi.Dims{ |
| 120 | {ID: "total_cache_miss", Name: "miss", Algo: collectorapi.Incremental}, |
| 121 | {ID: "total_cache_bypass", Name: "bypass", Algo: collectorapi.Incremental}, |
| 122 | {ID: "total_cache_expired", Name: "expired", Algo: collectorapi.Incremental}, |
| 123 | {ID: "total_cache_stale", Name: "stale", Algo: collectorapi.Incremental}, |
| 124 | {ID: "total_cache_updating", Name: "updating", Algo: collectorapi.Incremental}, |
| 125 | {ID: "total_cache_revalidated", Name: "revalidated", Algo: collectorapi.Incremental}, |
| 126 | {ID: "total_cache_hit", Name: "hit", Algo: collectorapi.Incremental}, |
| 127 | {ID: "total_cache_scarce", Name: "scarce", Algo: collectorapi.Incremental}, |
| 128 | }, |
| 129 | }, |
| 130 | } |