Documentation ¶
Index ¶
Constants ¶
View Source
const (
// Namespace const string
Namespace = "logstash"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector interface {
Collect(ch chan<- prometheus.Metric) (err error)
}
Collector interface implement Collect function
func NewNodeInfoCollector ¶ added in v0.1.2
NewNodeInfoCollector function
func NewNodeStatsCollector ¶
NewNodeStatsCollector function
type HTTPHandlerInterface ¶ added in v0.1.1
HTTPHandlerInterface interface
type NodeInfoCollector ¶ added in v0.1.2
type NodeInfoCollector struct { NodeInfos *prometheus.Desc OsInfos *prometheus.Desc JvmInfos *prometheus.Desc // contains filtered or unexported fields }
NodeInfoCollector type
func (*NodeInfoCollector) Collect ¶ added in v0.1.2
func (c *NodeInfoCollector) Collect(ch chan<- prometheus.Metric) error
Collect function implements nodestats_collector collector
type NodeInfoResponse ¶ added in v0.1.2
type NodeInfoResponse struct { Host string `json:"host"` Version string `json:"version"` HTTPAddress string `json:"http_address"` ID string `json:"id"` Name string `json:"name"` Pipeline struct { Workers int `json:"workers"` BatchSize int `json:"batch_size"` BatchDelay int `json:"batch_delay"` ConfigReloadAutomatic bool `json:"config_reload_automatic"` ConfigReloadInterval int `json:"config_reload_interval"` } `json:"pipeline"` Os struct { Name string `json:"name"` Arch string `json:"arch"` Version string `json:"version"` AvailableProcessors int `json:"available_processors"` } `json:"os"` Jvm struct { Pid int `json:"pid"` Version string `json:"version"` VMName string `json:"vm_name"` VMVersion string `json:"vm_version"` VMVendor string `json:"vm_vendor"` StartTimeInMillis int64 `json:"start_time_in_millis"` Mem struct { HeapInitInBytes int `json:"heap_init_in_bytes"` HeapMaxInBytes int `json:"heap_max_in_bytes"` NonHeapInitInBytes int `json:"non_heap_init_in_bytes"` NonHeapMaxInBytes int `json:"non_heap_max_in_bytes"` } `json:"mem"` GcCollectors []string `json:"gc_collectors"` } `json:"jvm"` }
NodeInfoResponse type
func NodeInfo ¶ added in v0.1.2
func NodeInfo(endpoint string) (NodeInfoResponse, error)
NodeInfo function
type NodeStatsCollector ¶
type NodeStatsCollector struct { JvmThreadsCount *prometheus.Desc JvmThreadsPeakCount *prometheus.Desc MemHeapUsedInBytes *prometheus.Desc MemHeapCommittedInBytes *prometheus.Desc MemHeapMaxInBytes *prometheus.Desc MemNonHeapUsedInBytes *prometheus.Desc MemNonHeapCommittedInBytes *prometheus.Desc MemPoolPeakUsedInBytes *prometheus.Desc MemPoolUsedInBytes *prometheus.Desc MemPoolPeakMaxInBytes *prometheus.Desc MemPoolMaxInBytes *prometheus.Desc MemPoolCommittedInBytes *prometheus.Desc GCCollectionTimeInMillis *prometheus.Desc GCCollectionCount *prometheus.Desc ProcessOpenFileDescriptors *prometheus.Desc ProcessMaxFileDescriptors *prometheus.Desc ProcessMemTotalVirtualInBytes *prometheus.Desc ProcessCPUTotalInMillis *prometheus.Desc PipelineDuration *prometheus.Desc PipelineEventsIn *prometheus.Desc PipelineEventsFiltered *prometheus.Desc PipelineEventsOut *prometheus.Desc PipelinePluginEventsDuration *prometheus.Desc PipelinePluginEventsIn *prometheus.Desc PipelinePluginEventsOut *prometheus.Desc PipelinePluginMatches *prometheus.Desc PipelinePluginFailures *prometheus.Desc PipelineQueueEvents *prometheus.Desc PipelineQueuePageCapacity *prometheus.Desc PipelineQueueMaxQueueSize *prometheus.Desc PipelineQueueMaxUnreadEvents *prometheus.Desc PipelineDeadLetterQueueSizeInBytes *prometheus.Desc // contains filtered or unexported fields }
NodeStatsCollector type
func (*NodeStatsCollector) Collect ¶
func (c *NodeStatsCollector) Collect(ch chan<- prometheus.Metric) error
Collect function implements nodestats_collector collector
type NodeStatsResponse ¶
type NodeStatsResponse struct { Host string `json:"host"` Version string `json:"version"` HTTPAddress string `json:"http_address"` Jvm struct { Threads struct { Count int `json:"count"` PeakCount int `json:"peak_count"` } `json:"threads"` Mem struct { HeapUsedInBytes int `json:"heap_used_in_bytes"` HeapUsedPercent int `json:"heap_used_percent"` HeapCommittedInBytes int `json:"heap_committed_in_bytes"` HeapMaxInBytes int `json:"heap_max_in_bytes"` NonHeapUsedInBytes int `json:"non_heap_used_in_bytes"` NonHeapCommittedInBytes int `json:"non_heap_committed_in_bytes"` Pools struct { Survivor struct { PeakUsedInBytes int `json:"peak_used_in_bytes"` UsedInBytes int `json:"used_in_bytes"` PeakMaxInBytes int `json:"peak_max_in_bytes"` MaxInBytes int `json:"max_in_bytes"` CommittedInBytes int `json:"committed_in_bytes"` } `json:"survivor"` Old struct { PeakUsedInBytes int `json:"peak_used_in_bytes"` UsedInBytes int `json:"used_in_bytes"` PeakMaxInBytes int `json:"peak_max_in_bytes"` MaxInBytes int `json:"max_in_bytes"` CommittedInBytes int `json:"committed_in_bytes"` } `json:"old"` Young struct { PeakUsedInBytes int `json:"peak_used_in_bytes"` UsedInBytes int `json:"used_in_bytes"` PeakMaxInBytes int `json:"peak_max_in_bytes"` MaxInBytes int `json:"max_in_bytes"` CommittedInBytes int `json:"committed_in_bytes"` } `json:"young"` } `json:"pools"` } `json:"mem"` Gc struct { Collectors struct { Old struct { CollectionTimeInMillis int `json:"collection_time_in_millis"` CollectionCount int `json:"collection_count"` } `json:"old"` Young struct { CollectionTimeInMillis int `json:"collection_time_in_millis"` CollectionCount int `json:"collection_count"` } `json:"young"` } `json:"collectors"` } `json:"gc"` } `json:"jvm"` Process struct { OpenFileDescriptors int `json:"open_file_descriptors"` PeakOpenFileDescriptors int `json:"peak_open_file_descriptors"` MaxFileDescriptors int `json:"max_file_descriptors"` Mem struct { TotalVirtualInBytes int64 `json:"total_virtual_in_bytes"` } `json:"mem"` CPU struct { TotalInMillis int64 `json:"total_in_millis"` Percent int `json:"percent"` } `json:"cpu"` } `json:"process"` Pipeline Pipeline `json:"pipeline"` // Logstash 5 Pipelines map[string]Pipeline `json:"pipelines"` // Logstash >=6 }
NodeStatsResponse type
type Pipeline ¶ added in v0.1.1
type Pipeline struct { Events struct { DurationInMillis int `json:"duration_in_millis"` In int `json:"in"` Filtered int `json:"filtered"` Out int `json:"out"` } `json:"events"` Plugins struct { Inputs []struct { ID string `json:"id"` Events struct { In int `json:"in"` Out int `json:"out"` } `json:"events"` Name string `json:"name"` } `json:"inputs,omitempty"` Filters []struct { ID string `json:"id"` Events struct { DurationInMillis int `json:"duration_in_millis"` In int `json:"in"` Out int `json:"out"` } `json:"events,omitempty"` Name string `json:"name"` Matches int `json:"matches,omitempty"` Failures int `json:"failures,omitempty"` PatternsPerField struct { CapturedRequestHeaders int `json:"captured_request_headers"` } `json:"patterns_per_field,omitempty"` Formats int `json:"formats,omitempty"` } `json:"filters"` Outputs []struct { ID string `json:"id"` Events struct { In int `json:"in"` Out int `json:"out"` } `json:"events"` Name string `json:"name"` } `json:"outputs"` } `json:"plugins"` Reloads struct { LastError interface{} `json:"last_error"` Successes int `json:"successes"` LastSuccessTimestamp interface{} `json:"last_success_timestamp"` LastFailureTimestamp interface{} `json:"last_failure_timestamp"` Failures int `json:"failures"` } `json:"reloads"` Queue struct { Events int `json:"events"` Type string `json:"type"` Capacity struct { PageCapacityInBytes int `json:"page_capacity_in_bytes"` MaxQueueSizeInBytes int64 `json:"max_queue_size_in_bytes"` MaxUnreadEvents int `json:"max_unread_events"` } `json:"capacity"` Data struct { Path string `json:"path"` FreeSpaceInBytes int64 `json:"free_space_in_bytes"` StorageType string `json:"storage_type"` } `json:"data"` } `json:"queue"` DeadLetterQueue struct { QueueSizeInBytes int `json:"queue_size_in_bytes"` } `json:"dead_letter_queue"` }
Pipeline type
Click to show internal directories.
Click to hide internal directories.