beater

package
v0.0.0-...-6e1f017 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2018 License: Apache-2.0, Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const CACHE_METRIC = "/ignite?cmd=cache&cacheName="
View Source
const CACHE_SIZE = "/ignite?cmd=size&cacheName="
View Source
const NODE_METRIC = "/ignite?cmd=node&mtr=true"
View Source
const (
	SQL_QUERY = "/ignite?cmd=qryfldexe&"
)

Variables

This section is empty.

Functions

func GetMyIP

func GetMyIP() (ip string, err error)

Get my IP

func New

func New(b *beat.Beat, cfg *common.Config) (beat.Beater, error)

Creates beater

func OpenURL

func OpenURL(u string) (body []byte, err error)

Open URL

Types

type Body

type Body struct {
	Error         string   `json:"error"`
	SessionToken  string   `json:"sessionToken"`
	Response      Response `json:"response,flow"`
	SuccessStatus int      `json:"successStatus"`
}

func BodyParser

func BodyParser(body []byte) (b Body, err error)

func (*Body) MakeEvents

func (bd *Body) MakeEvents() (events []*beat.Event, err error)

type Cache

type Cache struct {
	Name      string `json:"name"`
	Mode      string `json:"mode"`
	SqlSchema string `json:"sqlSchema"`
}

type CacheMetric

type CacheMetric struct {
	Read  int64 `json:"reads"`
	Write int64 `json:"writes"`
	Hit   int64 `json:"hits"`
	Miss  int64 `json:"misses"`
	Size  int64
}

type CacheMetricResponse

type CacheMetricResponse struct {
	SuccessStatus  int
	AffinityNodeId string
	Err            string
	SessionToken   string
	Response       CacheMetric `json:"response,flow"`
}

type CacheSizeResponse

type CacheSizeResponse struct {
	SuccessStatus  int
	AffinityNodeId string
	Err            string
	SessionToken   string
	Response       int64
}

type FieldMetadata

type FieldMetadata struct {
	FieldName     string `json:"fieldName"`
	FieldTypeName string `json:"fieldTypeName"`
	SchemaName    string `json:"schemaName"`
	TypeName      string `json:"typeName"`
}

type Ignitebeat

type Ignitebeat struct {
	// contains filtered or unexported fields
}

func (*Ignitebeat) GetCacheList

func (ib *Ignitebeat) GetCacheList() ([]Cache, error)

func (*Ignitebeat) GetCacheMetric

func (ib *Ignitebeat) GetCacheMetric(c *Cache) (CacheMetric, error)

func (*Ignitebeat) GetCacheSize

func (ib *Ignitebeat) GetCacheSize(c *Cache) (int64, error)

func (*Ignitebeat) GetNodeMetrics

func (ib *Ignitebeat) GetNodeMetrics() (NodeMetric, error)

func (*Ignitebeat) Run

func (bt *Ignitebeat) Run(b *beat.Beat) error

func (*Ignitebeat) Stop

func (bt *Ignitebeat) Stop()

type NodeMetric

type NodeMetric struct {
	Avg_active_jobs         float64 `json:"averageActiveJobs"`
	Avg_cancelled_jobs      float64 `json:"averageCancelledJobs"`
	Avg_CPU_load            float64 `json:"averageCpuLoad"`
	Avg_job_exetime         float64 `json:"averageJobExecuteTime"`
	Avg_job_waittime        float64 `json:"averageJobWaitTime"`
	Avg_rejected_jobs       float64 `json:"averageRejectedJobs"`
	Avg_waiting_jobs        float64 `json:"averageWaitingJobs"`
	Busy_time_pct           float64 `json:"busyTimePercentage"`
	Crt_active_jobs         float64 `json:"currentActiveJobs"`
	Crt_cancelled_jobs      float64 `json:"currentCancelledJobs"`
	Crt_CPU_load            float64 `json:"currentCpuLoad"`
	Crt_daemon_thread_count float64 `json:"currentDaemonThreadCount"`
	Crt_GC_CPU_load         float64 `json:"currentGcCpuLoad"`
	Crt_idle_time           float64 `json:"currentIdleTime"`
	Crt_job_exetime         float64 `json:"currentJobExecuteTime"`
	Crt_job_waittime        float64 `json:"currentJobWaitTime"`
	Crt_rejected_jobs       float64 `json:"currentRejectedJobs"`
	Crt_thread_count        float64 `json:"currentThreadCount"`
	Crt_waiting_jobs        float64 `json:"currentWaitingJobs"`
	Heap_committed          float64 `json:"heapMemoryCommitted"`
	Heap_initialized        float64 `json:"heapMemoryInitialized"`
	Heap_max                float64 `json:"heapMemoryMaximum"`
	Heap_used               float64 `json:"heapMemoryUsed"`
	Idle_time_pct           float64 `json:"idleTimePercentage"`
	Max_active_jobs         float64 `json:"maximumActiveJobs"`
	Max_cancelled_jobs      float64 `json:"maximumCancelledJobs"`
	Max_job_exetime         float64 `json:"maximumJobExecuteTime"`
	Max_job_waittime        float64 `json:"maximumJobWaitTime"`
	Max_rejected_jobs       float64 `json:"maximumRejectedJobs"`
	Max_thread_count        float64 `json:"maximumThreadCount"`
	Max_waiting_jobs        float64 `json:"maximumWaitingJobs"`
	Nonheap_committed       float64 `json:"nonHeapMemoryCommitted"`
	Nonheap_initialized     float64 `json:"nonHeapMemoryInitialized"`
	Nonheap_max             float64 `json:"nonHeapMemoryMaximum"`
	Nonheap_used            float64 `json:"nonHeapMemoryUsed"`
	Received_bytes          float64 `json:"receivedBytesCount"`
	Received_msg            float64 `json:"receivedMessagesCount"`
	Sent_bytes              float64 `json:"sentBytesCount"`
	Sent_msg                float64 `json:"sentMessagesCount"`
	Total_busy_time         float64 `json:"totalBusyTime"`
	Total_cancelled_jobs    float64 `json:"totalCancelledJobs"`
	Total_executed_jobs     float64 `json:"totalExecutedJobs"`
	Total_executed_tasks    float64 `json:"totalExecutedTasks"`
	Total_idle_time         float64 `json:"totalIdleTime"`
	Total_rejected_jobs     float64 `json:"totalRejectedJobs"`
	Total_started_thread    float64 `json:"totalStartedThreadCount"`
	Uptime                  float64 `json:"upTime"`
}

type Response

type Response struct {
	FieldsMetadata []FieldMetadata `json:"fieldsMetadata,flow"`
	Items          [][]interface{} `json:"items,flow"`
}

type SQuery

type SQuery struct {
	Query  *config.Query
	Server string
}

func (*SQuery) GenEvents

func (q *SQuery) GenEvents() (events []*beat.Event, err error)

func (*SQuery) GenURL

func (q *SQuery) GenURL() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL