Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TLSConf ¶
type TLSConf struct { Hostname string `yaml:"hostname"` RootOrg string `yaml:"rootOrg"` RootCN string `yaml:"rootCN"` Response string `yaml:"response"` }
TLSConf is exported to receive YAML configuration.
func (TLSConf) Instrument ¶
func (c TLSConf) Instrument() map[string]prometheus.Collector
Instrument constructs any `prometheus.Collector` objects the `TLSProbe` will need to report its own metrics. A map is returned containing the constructed objects, indexed by the name of the Promtheus metric. If no objects were constructed, nil is returned.
func (TLSConf) MakeProber ¶
MakeProber constructs a `TLSProbe` object from the contents of the bound `TLSConf` object. If the `TLSConf` cannot be validated, an error appropriate for end-user consumption is returned instead.
func (TLSConf) UnmarshalSettings ¶
func (c TLSConf) UnmarshalSettings(settings []byte) (probers.Configurer, error)
UnmarshalSettings takes YAML as bytes and unmarshals it to the to an TLSConf object.
type TLSProbe ¶
type TLSProbe struct {
// contains filtered or unexported fields
}
TLSProbe is the exported `Prober` object for monitors configured to perform TLS protocols.
func (TLSProbe) Probe ¶
Probe performs the configured TLS probe. Return true if the root has the expected Subject (or if no root is provided for comparison in settings), and the end entity certificate has the correct expiration status (either expired or unexpired, depending on what is configured). Exports metrics for the NotAfter timestamp of the end entity certificate and the reason for the Probe returning false ("none" if returns true).