Documentation ¶
Index ¶
Constants ¶
View Source
const ( ExitCodeOK int = 0 ExitCodeParseFlagError int = 1 + iota )
Exit codes are int values that represent an exit code for a particular error.
View Source
const Name string = "mackerel-plugin-conntrack"
Name is executable name of this application.
View Source
const Version string = "0.1.0"
Version is version string of this application.
Variables ¶
View Source
var ConntrackCountPaths = []string{
"/proc/sys/net/netfilter/nf_conntrack_count",
"/proc/sys/net/ipv4/netfilter/ip_conntrack_count",
}
ConntrackCountPaths is paths to conntrack_count files.
View Source
var ConntrackMaxPaths = []string{
"/proc/sys/net/nf_conntrack_max",
"/proc/sys/net/netfilter/nf_conntrack_max",
"/proc/sys/net/ipv4/ip_conntrack_max",
"/proc/sys/net/ipv4/netfilter/ip_conntrack_max",
}
ConntrackMaxPaths is paths to conntrack_max files.
Functions ¶
func CurrentValue ¶
CurrentValue returns a value from a file.
Types ¶
type CLI ¶
type CLI struct {
// contains filtered or unexported fields
}
CLI is the object for command line interface.
type ConntrackPlugin ¶
type ConntrackPlugin struct{}
ConntrackPlugin mackerel plugin for *_conntrack.
func (ConntrackPlugin) FetchMetrics ¶
func (c ConntrackPlugin) FetchMetrics() (map[string]interface{}, error)
FetchMetrics interface for mackerelplugin.
func (ConntrackPlugin) GraphDefinition ¶
func (c ConntrackPlugin) GraphDefinition() map[string]mp.Graphs
GraphDefinition interface for mackerelplugin.
Click to show internal directories.
Click to hide internal directories.