circhttpjson

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 17 Imported by: 0

README

Circonus HTTP JSON

This input plugin provides the ability to fetch Circonus HTTPTrap stream tag and structured format metrics and forward them to a Circonus Unified Agent check.

Configuration

IRONdb example:

[[inputs.circ_http_json]]
  instance_id = "idb_stats"
  url = "http://127.0.0.1:8112/stats.json?format=tagged"

Note the addition of ?format=tagged query argument -- use for these ironDB endpoints to ensure stream tagged, structured metric format.

Example Metric Format

 {
   "foo|ST[env:prod,app:web]": { "_type": "n", "_value": 12 },
   "foo|ST[env:qa,app:web]":   { "_type": "I", "_value": 0 },
   "foo|ST[b\"fihiYXIp\":b\"PHF1dXg+\"]": { "_type": "L", "_value": 3 }
 }

The metric type _type must be a valid HTTPTrap / Reconnoiter type:

  • i int
  • I uint
  • l int64
  • L uint64
  • n double
  • h histogram
  • H cumulative histogram
  • s text

The optional _ts timestamp (in milliseconds) value may also be used.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CHJ

type CHJ struct {
	Log cua.Logger

	TLSCN      string
	InstanceID string `json:"instance_id"`
	URL        string
	TLSCAFile  string
	Debug      bool
	// contains filtered or unexported fields
}

func (*CHJ) Description

func (*CHJ) Description() string

func (*CHJ) Gather

func (chj *CHJ) Gather(ctx context.Context, _ cua.Accumulator) error

func (*CHJ) Init

func (chj *CHJ) Init() error

func (*CHJ) SampleConfig

func (*CHJ) SampleConfig() string

type Logshim added in v0.0.39

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

Logshim is for retryablehttp

func (Logshim) Debugf added in v0.0.39

func (l Logshim) Debugf(fmt string, args ...interface{})

func (Logshim) Errorf added in v0.0.39

func (l Logshim) Errorf(fmt string, args ...interface{})

func (Logshim) Infof added in v0.0.39

func (l Logshim) Infof(fmt string, args ...interface{})

func (Logshim) Printf added in v0.0.39

func (l Logshim) Printf(fmt string, args ...interface{})

func (Logshim) Warnf added in v0.0.39

func (l Logshim) Warnf(fmt string, args ...interface{})

Jump to

Keyboard shortcuts

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