Skip to content

Commit 35b87c2

Browse files
committed
add metrics to readme
1 parent 86157d4 commit 35b87c2

File tree

1 file changed

+139
-2
lines changed

1 file changed

+139
-2
lines changed

README.md

Lines changed: 139 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,142 @@ This will be used automatically if `api.password` flag is not set.
3434
`./wanguard_exporter -api.address="127.0.0.1:81" -api.username="admin" api.password="password"`
3535

3636
## Metrics
37-
The latest, accurate metrics for each collector can be viewed by accessing the corresponding test file located at `collectors/name_collector_test.go`. In this file, the `nameExpectedMetrics()` function provides users with a structured way to examine the expected metrics associated with each collector.
38-
- Change `name` with actual collectors name.
37+
38+
### License Collector
39+
Metric | Type | Description | Labels
40+
-------|------|-------------|-------
41+
wanguard_license_software_version | gauge | Software version | software_version
42+
wanguard_license_sensors_available | gauge | Licensed sensors available |
43+
wanguard_license_sensors_used | gauge | Licensed sensors used |
44+
wanguard_license_sensors_remaining | gauge | Licensed sensors remaining |
45+
wanguard_license_dpdk_engines_available | gauge | Licensed DPDK engines available |
46+
wanguard_license_dpdk_engines_used | gauge | Licensed DPDK engines used |
47+
wanguard_license_dpdk_engines_remaining | gauge | Licensed DPDK engines remaining |
48+
wanguard_license_filters_available | gauge | Licensed filters available |
49+
wanguard_license_filters_used | gauge | Licensed filters used |
50+
wanguard_license_filters_remaining | gauge | Licensed filters remaining |
51+
wanguard_license_seconds_remaining | gauge | License seconds remaining |
52+
wanguard_license_support_seconds_remaining | gauge | Support license seconds remaining |
53+
54+
Example:
55+
```
56+
wanguard_license_software_version{software_version="8.3-21"} 1
57+
wanguard_license_sensors_available 1
58+
wanguard_license_sensors_used 1
59+
wanguard_license_sensors_remaining 0
60+
wanguard_license_seconds_remaining 86400
61+
```
62+
63+
### Announcements Collector
64+
Metric | Type | Description | Labels
65+
-------|------|-------------|-------
66+
wanguard_announcements_active | gauge | Active announcements at the moment | announcement_id, bgp_connector_name, from, prefix, until
67+
wanguard_announcements_finished | gauge | Total amount of finished announcements |
68+
69+
Example:
70+
```
71+
wanguard_announcements_active{announcement_id="1",bgp_connector_name="Connector 1",from="2024-10-23 09:31:01",prefix="10.10.10.10/32",until=""} 1
72+
wanguard_announcements_finished 1
73+
```
74+
75+
### Anomalies Collector
76+
Metric | Type | Description | Labels
77+
-------|------|-------------|-------
78+
wanguard_anomalies_active | gauge | Active anomalies at the moment | anomaly, anomaly_id, bits, bits_s, duration, packets, pkts_s, prefix
79+
wanguard_anomalies_finished | gauge | Number of finished anomalies |
80+
81+
Example:
82+
```
83+
wanguard_anomalies_active{anomaly="ICMP pkts/s > 1",anomaly_id="1",bits="169576384000",bits_s="9014400",duration="60",packets="320020500",pkts_s="17500",prefix="10.10.10.10/32"} 1
84+
wanguard_anomalies_finished 1
85+
```
86+
87+
### Components Collector
88+
Metric | Type | Description | Labels
89+
-------|------|-------------|-------
90+
wanguard_component_status | gauge | Status of the component | component_category, component_name
91+
92+
Example:
93+
```
94+
wanguard_component_status{component_category="bgp_connector",component_name="BGP Connector 1"} 1
95+
wanguard_component_status{component_category="filter",component_name="Packet Filter 1"} 1
96+
wanguard_component_status{component_category="sensor",component_name="Flow Sensor 1"} 1
97+
```
98+
99+
### Actions Collector
100+
Metric | Type | Description | Labels
101+
-------|------|-------------|-------
102+
wanguard_action_status | gauge | Status of the response actions | action_name, action_type, response_branch, response_name
103+
104+
Example:
105+
```
106+
wanguard_action_status{action_name="Action 1",action_type="Send a custom Syslog message",response_branch="When an anomaly is detected",response_name="Response 1"} 1
107+
```
108+
109+
### Sensors Collector
110+
Metric | Type | Description | Labels
111+
-------|------|-------------|-------
112+
wanguard_sensor_internal_ips | gauge | Total number of internal ip addresses | sensor_id, sensor_name
113+
wanguard_sensor_external_ips | gauge | Total number of external ip addresses | sensor_id, sensor_name
114+
wanguard_sensor_packets_per_second_in | gauge | Incoming packets per second | sensor_id, sensor_name
115+
wanguard_sensor_packets_per_second_out | gauge | Outgoing packets per second | sensor_id, sensor_name
116+
wanguard_sensor_bytes_per_second_in | gauge | Incoming bytes per second | sensor_id, sensor_name
117+
wanguard_sensor_bytes_per_second_out | gauge | Outgoing bytes per second | sensor_id, sensor_name
118+
wanguard_sensor_dropped_in | gauge | Total number of dropped packets in | sensor_id, sensor_name
119+
wanguard_sensor_dropped_out | gauge | Total number of dropped packets out | sensor_id, sensor_name
120+
wanguard_sensor_usage_in | gauge | Interface incoming traffic usage | sensor_id, sensor_name
121+
wanguard_sensor_usage_out | gauge | Interface outgoing traffic usage | sensor_id, sensor_name
122+
wanguard_sensor_load | gauge | Sensors load | sensor_id, sensor_name
123+
wanguard_sensor_cpu | gauge | Sensors CPU usage | sensor_id, sensor_name
124+
wanguard_sensor_ram | gauge | Sensors ram usage | sensor_id, sensor_name
125+
126+
Example:
127+
```
128+
wanguard_sensor_internal_ips{sensor_id="1",sensor_name="Interface 1"} 1
129+
wanguard_sensor_external_ips{sensor_id="1",sensor_name="Interface 1"} 0
130+
wanguard_sensor_packets_per_second_in{sensor_id="1",sensor_name="Interface 1"} 100
131+
wanguard_sensor_bytes_per_second_in{sensor_id="1",sensor_name="Interface 1"} 125
132+
wanguard_sensor_cpu{sensor_id="1",sensor_name="Interface 1"} 0
133+
wanguard_sensor_ram{sensor_id="1",sensor_name="Interface 1"} 128
134+
```
135+
136+
### Traffic Collector
137+
Metric | Type | Description | Labels
138+
-------|------|-------------|-------
139+
wanguard_traffic_country_packets_per_second_in | gauge | Packets per second in by country | country, country_code
140+
wanguard_traffic_country_packets_per_second_out | gauge | Packets per second out by country | country, country_code
141+
wanguard_traffic_country_bytes_per_second_in | gauge | Bytes per second in by country | country, country_code
142+
wanguard_traffic_country_bytes_per_second_out | gauge | Bytes per second out by country | country, country_code
143+
wanguard_traffic_ip_version_packets_per_second_in | gauge | Packets per second in by IP version | ip_version
144+
wanguard_traffic_ip_version_packets_per_second_out | gauge | Packets per second out by IP version | ip_version
145+
wanguard_traffic_ip_version_bytes_per_second_in | gauge | Bytes per second in by IP version | ip_version
146+
wanguard_traffic_ip_version_bytes_per_second_out | gauge | Bytes per second out by IP version | ip_version
147+
wanguard_traffic_ip_protocol_packets_per_second_in | gauge | Packets per second in by IP protocol | ip_protocol
148+
wanguard_traffic_ip_protocol_packets_per_second_out | gauge | Packets per second out by IP protocol | ip_protocol
149+
wanguard_traffic_ip_protocol_bytes_per_second_in | gauge | Bytes per second in by IP protocol | ip_protocol
150+
wanguard_traffic_ip_protocol_bytes_per_second_out | gauge | Bytes per second out by IP protocol | ip_protocol
151+
wanguard_traffic_talkers_packets_per_second_in | gauge | Packets per second in by IP address | ip_address
152+
wanguard_traffic_talkers_packets_per_second_out | gauge | Packets per second out by IP address | ip_address
153+
wanguard_traffic_talkers_bytes_per_second_in | gauge | Bytes per second in by IP address | ip_address
154+
wanguard_traffic_talkers_bytes_per_second_out | gauge | Bytes per second out by IP address | ip_address
155+
156+
Example:
157+
```
158+
wanguard_traffic_country_packets_per_second_in{country="United States",country_code="US"} 200
159+
wanguard_traffic_country_bytes_per_second_in{country="United States",country_code="US"} 200
160+
wanguard_traffic_ip_version_packets_per_second_in{ip_version="IPv4"} 100
161+
wanguard_traffic_ip_protocol_bytes_per_second_in{ip_protocol="TCP"} 100
162+
wanguard_traffic_talkers_packets_per_second_in{ip_address="10.10.10.10"} 100
163+
```
164+
165+
### Firewall Rules Collector
166+
Metric | Type | Description | Labels
167+
-------|------|-------------|-------
168+
wanguard_firewall_rules_active | gauge | Active firewall rules at the moment | attack_id, bits, bits_s, destination_prefix, from, ip_protocol, max_bits_s, max_pkts_s, pkts, pkts_s, rule_id, source_prefix, until
169+
wanguard_firewall_rules_activated | gauge | Number of activated firewall rules |
170+
171+
Example:
172+
```
173+
wanguard_firewall_rules_active{attack_id="1",bits="0",bits_s="0",destination_prefix="any",from="2024-10-28 06:37:02",ip_protocol="tcp",max_bits_s="0",max_pkts_s="0",pkts="0",pkts_s="0",rule_id="1",source_prefix="any",until=""} 1
174+
wanguard_firewall_rules_activated 1
175+
```

0 commit comments

Comments
 (0)