-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(internal): enhance network event processing with subnet and impr…
…ove metrics organization
- Loading branch information
Showing
3 changed files
with
54 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package metrics | ||
|
||
import "github.com/prometheus/client_golang/prometheus" | ||
|
||
var DNSQueryCounter = prometheus.NewCounterVec( | ||
prometheus.CounterOpts{ | ||
Name: "dns_query_counter", | ||
Help: "Number of DNS queries", | ||
}, | ||
[]string{"container"}, | ||
) | ||
|
||
var SyscallCounter = prometheus.NewCounterVec( | ||
prometheus.CounterOpts{ | ||
Name: "syscall_counter", | ||
Help: "Number of syscalls", | ||
}, | ||
[]string{"syscall", "container"}, | ||
) | ||
|
||
var NetworkReceivedBytesCounter = prometheus.NewCounterVec( | ||
prometheus.CounterOpts{ | ||
Name: "network_received_bytes_counter", | ||
Help: "Number of bytes received", | ||
}, | ||
[]string{"container", "remote_subnet"}, | ||
) | ||
|
||
var NetworkSentBytesCounter = prometheus.NewCounterVec( | ||
prometheus.CounterOpts{ | ||
Name: "network_sent_bytes_counter", | ||
Help: "Number of bytes sent", | ||
}, | ||
[]string{"container", "remote_subnet"}, | ||
) | ||
|
||
var NetworkSentPacketsCounter = prometheus.NewCounterVec( | ||
prometheus.CounterOpts{ | ||
Name: "network_sent_packets_counter", | ||
Help: "Number of packets sent", | ||
}, | ||
[]string{"container", "remote_subnet"}, | ||
) | ||
|
||
var NetworkReceivedPacketsCounter = prometheus.NewCounterVec( | ||
prometheus.CounterOpts{ | ||
Name: "network_received_packets_counter", | ||
Help: "Number of packets received", | ||
}, | ||
[]string{"container", "remote_subnet"}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters