1
0
Fork 0

Adding upstream version 1.34.4.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-24 07:26:29 +02:00
parent e393c3af3f
commit 4978089aab
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
4963 changed files with 677545 additions and 0 deletions

View file

@ -0,0 +1,64 @@
# CloudEvents Serializer
The `cloudevents` data format outputs metrics as [CloudEvents][CloudEvents] in
[JSON format][JSON Spec]. Currently, versions v1.0 and v0.3 of the specification
are supported with the former being the default.
[CloudEvents]: https://cloudevents.io
[JSON Spec]: https://github.com/cloudevents/spec/blob/v1.0/json-format.md
## Configuration
```toml
[[outputs.file]]
## Files to write to, "stdout" is a specially handled file
files = ["stdout", "/tmp/metrics.out"]
## Data format to output
## Each data format has its own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
data_format = "cloudevents"
## Specification version to use for events
## Currently versions "0.3" and "1.0" are supported.
# cloudevents_version = "1.0"
## Event source specifier
## This allows to overwrite the source header-field with the given value.
# cloudevents_source = "telegraf"
## Tag to use as event source specifier
## This allows to overwrite the source header-field with the value of the
## specified tag. If both 'cloudevents_source' and 'cloudevents_source_tag'
## are set, the this setting will take precedence. In case the specified tag
## value does not exist for a metric, the serializer will fallback to
## 'cloudevents_source'.
# cloudevents_source_tag = ""
## Event-type specifier to overwrite the default value
## By default, events (and event batches) containing a single metric will
## set the event-type to 'com.influxdata.telegraf.metric' while events
## containing a batch of metrics will set the event-type to
## 'com.influxdata.telegraf.metric' (plural).
# cloudevents_event_type = ""
## Set time header of the event
## Supported values are:
## none -- do not set event time
## earliest -- use timestamp of the earliest metric
## latest -- use timestamp of the latest metric
## creation -- use timestamp of event creation
## For events containing only a single metric, earliest and latest are
## equivalent.
# cloudevents_event_time = "latest"
## Batch format of the output when running in batch mode
## If set to 'events' the resulting output will contain a list of events,
## each with a single metric according to the JSON Batch Format of the
## specification. Use 'application/cloudevents-batch+json' for this format.
##
## When set to 'metrics', a single event will be generated containing a list
## of metrics as payload. Use 'application/cloudevents+json' for this format.
# cloudevents_batch_format = "events"
```

View file

@ -0,0 +1,199 @@
package cloudevents
import (
"encoding/json"
"errors"
"fmt"
"time"
cloudevents "github.com/cloudevents/sdk-go/v2"
"github.com/cloudevents/sdk-go/v2/event"
"github.com/gofrs/uuid/v5"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins/serializers"
)
const (
EventTypeSingle = "com.influxdata.telegraf.metric"
EventTypeBatch = "com.influxdata.telegraf.metrics"
)
type Serializer struct {
Version string `toml:"cloudevents_version"`
Source string `toml:"cloudevents_source"`
SourceTag string `toml:"cloudevents_source_tag"`
EventType string `toml:"cloudevents_event_type"`
EventTime string `toml:"cloudevents_event_time"`
BatchFormat string `toml:"cloudevents_batch_format"`
Log telegraf.Logger `toml:"-"`
idgen uuid.Generator
}
func (s *Serializer) Init() error {
switch s.Version {
case "":
s.Version = event.CloudEventsVersionV1
case event.CloudEventsVersionV03, event.CloudEventsVersionV1:
default:
return errors.New("invalid 'cloudevents_version'")
}
switch s.EventTime {
case "":
s.EventTime = "latest"
case "none", "earliest", "latest", "creation":
default:
return errors.New("invalid 'cloudevents_event_time'")
}
switch s.BatchFormat {
case "":
s.BatchFormat = "events"
case "metrics", "events":
default:
return errors.New("invalid 'cloudevents_batch_format'")
}
if s.Source == "" {
s.Source = "telegraf"
}
s.idgen = uuid.NewGen()
return nil
}
func (s *Serializer) Serialize(m telegraf.Metric) ([]byte, error) {
// Create the event that forms the envelop around the metric
evt, err := s.createEvent(m)
if err != nil {
return nil, err
}
return evt.MarshalJSON()
}
func (s *Serializer) SerializeBatch(metrics []telegraf.Metric) ([]byte, error) {
switch s.BatchFormat {
case "metrics":
return s.batchMetrics(metrics)
case "events":
return s.batchEvents(metrics)
}
return nil, fmt.Errorf("unexpected batch-format %q", s.BatchFormat)
}
func (s *Serializer) batchMetrics(metrics []telegraf.Metric) ([]byte, error) {
// Determine the necessary information
eventType := EventTypeBatch
if s.EventType != "" {
eventType = s.EventType
}
id, err := s.idgen.NewV1()
if err != nil {
return nil, fmt.Errorf("generating ID failed: %w", err)
}
// Serialize the metrics
var earliest, latest time.Time
data := make([]map[string]interface{}, 0, len(metrics))
for _, m := range metrics {
ts := m.Time()
data = append(data, map[string]interface{}{
"name": m.Name(),
"tags": m.Tags(),
"fields": m.Fields(),
"timestamp": ts.UnixNano(),
})
if ts.Before(earliest) {
earliest = ts
}
if ts.After(latest) {
latest = ts
}
}
// Create the event that forms the envelop around the metric
evt := cloudevents.NewEvent(s.Version)
evt.SetSource(s.Source)
evt.SetID(id.String())
evt.SetType(eventType)
if err := evt.SetData(cloudevents.ApplicationJSON, data); err != nil {
return nil, fmt.Errorf("setting data failed: %w", err)
}
switch s.EventTime {
case "creation":
evt.SetTime(time.Now())
case "earliest":
evt.SetTime(earliest)
case "latest":
evt.SetTime(latest)
}
return json.Marshal(evt)
}
func (s *Serializer) batchEvents(metrics []telegraf.Metric) ([]byte, error) {
events := make([]*cloudevents.Event, 0, len(metrics))
for _, m := range metrics {
e, err := s.createEvent(m)
if err != nil {
s.Log.Errorf("Creating event for %v failed: %v", m, err)
continue
}
events = append(events, e)
}
return json.Marshal(events)
}
func (s *Serializer) createEvent(m telegraf.Metric) (*cloudevents.Event, error) {
// Determine the necessary information
source := s.Source
if s.SourceTag != "" {
if v, ok := m.GetTag(s.SourceTag); ok {
source = v
}
}
eventType := EventTypeSingle
if s.EventType != "" {
eventType = s.EventType
}
id, err := s.idgen.NewV1()
if err != nil {
return nil, fmt.Errorf("generating ID failed: %w", err)
}
// Serialize the metric
data := map[string]interface{}{
"name": m.Name(),
"tags": m.Tags(),
"fields": m.Fields(),
"timestamp": m.Time().UnixNano(),
}
// Create the event that forms the envelop around the metric
evt := cloudevents.NewEvent(s.Version)
evt.SetSource(source)
evt.SetID(id.String())
evt.SetType(eventType)
if err := evt.SetData(cloudevents.ApplicationJSON, data); err != nil {
return nil, fmt.Errorf("setting data failed: %w", err)
}
switch s.EventTime {
case "creation":
evt.SetTime(time.Now())
case "earliest", "latest":
evt.SetTime(m.Time())
}
return &evt, nil
}
func init() {
serializers.Add("cloudevents",
func() telegraf.Serializer {
return &Serializer{}
},
)
}

View file

@ -0,0 +1,271 @@
package cloudevents
import (
"bytes"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"os"
"path/filepath"
"strings"
"testing"
"time"
cloudevents "github.com/cloudevents/sdk-go/v2"
"github.com/gofrs/uuid/v5"
"github.com/santhosh-tekuri/jsonschema/v5"
"github.com/stretchr/testify/require"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/config"
"github.com/influxdata/telegraf/models"
"github.com/influxdata/telegraf/plugins/outputs"
"github.com/influxdata/telegraf/plugins/parsers/influx"
"github.com/influxdata/telegraf/plugins/serializers"
"github.com/influxdata/telegraf/testutil"
)
func TestCases(t *testing.T) {
// Get all directories in testcases
folders, err := os.ReadDir("testcases")
require.NoError(t, err)
// Make sure tests contains data
require.NotEmpty(t, folders)
// Set up for file inputs
outputs.Add("dummy", func() telegraf.Output {
return &OutputDummy{}
})
for _, f := range folders {
// Only handle folders
if !f.IsDir() {
continue
}
fname := f.Name()
t.Run(fname, func(t *testing.T) {
testdataPath := filepath.Join("testcases", fname)
configFilename := filepath.Join(testdataPath, "telegraf.conf")
inputFilename := filepath.Join(testdataPath, "input.influx")
expectedFilename := filepath.Join(testdataPath, "expected.json")
// Get parser to parse input and expected output
parser := &influx.Parser{}
require.NoError(t, parser.Init())
input, err := testutil.ParseMetricsFromFile(inputFilename, parser)
require.NoError(t, err)
var expected []map[string]interface{}
ebuf, err := os.ReadFile(expectedFilename)
require.NoError(t, err)
require.NoError(t, json.Unmarshal(ebuf, &expected))
// Configure the plugin
cfg := config.NewConfig()
require.NoError(t, cfg.LoadConfig(configFilename))
require.Len(t, cfg.Outputs, 1, "wrong number of outputs")
plugin, ok := cfg.Outputs[0].Output.(*OutputDummy)
require.True(t, ok)
serializer, ok := plugin.serializer.(*models.RunningSerializer).Serializer.(*Serializer)
require.True(t, ok)
serializer.idgen = &dummygen{}
// Write input and compare with expected metrics
require.NoError(t, plugin.Write(input))
require.NoError(t, checkEvents(plugin.output))
var joined string
switch len(plugin.output) {
case 0:
require.Emptyf(t, expected, "empty output but %d expected", len(expected))
case 1:
joined = string(plugin.output[0])
if !strings.HasPrefix(joined, "[") {
joined = "[" + joined + "]"
}
default:
joined = "[" + string(bytes.Join(plugin.output, []byte(","))) + "]"
}
var actual []map[string]interface{}
require.NoError(t, json.Unmarshal([]byte(joined), &actual))
require.Len(t, actual, len(expected))
require.ElementsMatch(t, expected, actual)
})
}
}
/* Internal testing functions */
func unmarshalEvents(messages [][]byte) ([]cloudevents.Event, error) {
var events []cloudevents.Event
for i, msg := range messages {
// Check for batch settings
var es []cloudevents.Event
if err := json.Unmarshal(msg, &es); err != nil {
if errors.Is(err, &json.UnmarshalTypeError{}) {
return nil, fmt.Errorf("message %d: %w", i, err)
}
var e cloudevents.Event
if err := json.Unmarshal(msg, &e); err != nil {
return nil, fmt.Errorf("message %d: %w", i, err)
}
events = append(events, e)
} else {
events = append(events, es...)
}
}
return events, nil
}
func checkEvents(messages [][]byte) error {
events, err := unmarshalEvents(messages)
if err != nil {
return err
}
for i, e := range events {
if err := e.Validate(); err != nil {
return fmt.Errorf("event %d: %w", i, err)
}
// Do an additional schema validation
var schema *jsonschema.Schema
switch e.SpecVersion() {
case "0.3":
schema = jsonschema.MustCompile("testcases/cloudevents-v0.3-schema.json")
case "1.0":
schema = jsonschema.MustCompile("testcases/cloudevents-v1.0-schema.json")
default:
return fmt.Errorf("unhandled spec version %q in event %d", e.SpecVersion(), i)
}
serializedEvent, err := json.Marshal(e)
if err != nil {
return fmt.Errorf("serializing raw event %d: %w", i, err)
}
var rawEvent interface{}
if err := json.Unmarshal(serializedEvent, &rawEvent); err != nil {
return fmt.Errorf("deserializing raw event %d: %w", i, err)
}
if err := schema.Validate(rawEvent); err != nil {
return fmt.Errorf("validation of event %d: %w", i, err)
}
}
return nil
}
/* Dummy output to allow full config parsing loop */
type OutputDummy struct {
Batch bool `toml:"batch"`
serializer telegraf.Serializer
output [][]byte
}
func (*OutputDummy) SampleConfig() string {
return "dummy"
}
func (o *OutputDummy) Connect() error {
o.output = make([][]byte, 0)
return nil
}
func (*OutputDummy) Close() error {
return nil
}
func (o *OutputDummy) Write(metrics []telegraf.Metric) error {
if o.Batch {
buf, err := o.serializer.SerializeBatch(metrics)
if err != nil {
return err
}
o.output = append(o.output, buf)
} else {
for _, m := range metrics {
buf, err := o.serializer.Serialize(m)
if err != nil {
return err
}
o.output = append(o.output, buf)
}
}
return nil
}
func (o *OutputDummy) SetSerializer(s telegraf.Serializer) {
o.serializer = s
}
/* Dummy UUID generator to get predictable UUIDs for testing */
const testid = "845f6acae52a11ed9976d8bbc1a4a0c6"
type dummygen struct{}
func (*dummygen) NewV1() (uuid.UUID, error) {
id, err := hex.DecodeString(testid)
if err != nil {
return uuid.UUID([16]byte{}), err
}
return uuid.UUID(id), nil
}
func (*dummygen) NewV3(_ uuid.UUID, _ string) uuid.UUID {
return uuid.UUID([16]byte{})
}
func (*dummygen) NewV4() (uuid.UUID, error) {
return uuid.UUID([16]byte{}), errors.New("wrong type")
}
func (*dummygen) NewV5(_ uuid.UUID, _ string) uuid.UUID {
return uuid.UUID([16]byte{})
}
func (*dummygen) NewV6() (uuid.UUID, error) {
return uuid.UUID([16]byte{}), errors.New("wrong type")
}
func (*dummygen) NewV7() (uuid.UUID, error) {
return uuid.UUID([16]byte{}), errors.New("wrong type")
}
func (*dummygen) NewV1AtTime(_ time.Time) (uuid.UUID, error) {
return uuid.UUID([16]byte{}), errors.New("wrong type")
}
func (*dummygen) NewV6AtTime(_ time.Time) (uuid.UUID, error) {
return uuid.UUID([16]byte{}), errors.New("wrong type")
}
func (*dummygen) NewV7AtTime(_ time.Time) (uuid.UUID, error) {
return uuid.UUID([16]byte{}), errors.New("wrong type")
}
func BenchmarkSerialize(b *testing.B) {
s := &Serializer{}
require.NoError(b, s.Init())
metrics := serializers.BenchmarkMetrics(b)
b.ResetTimer()
for i := 0; i < b.N; i++ {
_, err := s.Serialize(metrics[i%len(metrics)])
require.NoError(b, err)
}
}
func BenchmarkSerializeBatch(b *testing.B) {
s := &Serializer{}
require.NoError(b, s.Init())
m := serializers.BenchmarkMetrics(b)
metrics := m[:]
b.ResetTimer()
for i := 0; i < b.N; i++ {
_, err := s.SerializeBatch(metrics)
require.NoError(b, err)
}
}

View file

@ -0,0 +1,478 @@
[
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu0",
"host": "Hugin"
},
"timestamp": 1682613051000000000
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000001Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu1",
"host": "Hugin"
},
"timestamp": 1682613051000000001
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000002Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu2",
"host": "Hugin"
},
"timestamp": 1682613051000000002
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000003Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu3",
"host": "Hugin"
},
"timestamp": 1682613051000000003
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000004Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu4",
"host": "Hugin"
},
"timestamp": 1682613051000000004
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000005Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu5",
"host": "Hugin"
},
"timestamp": 1682613051000000005
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000006Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu6",
"host": "Hugin"
},
"timestamp": 1682613051000000006
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000007Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu7",
"host": "Hugin"
},
"timestamp": 1682613051000000007
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000008Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu8",
"host": "Hugin"
},
"timestamp": 1682613051000000008
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000009Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu9",
"host": "Hugin"
},
"timestamp": 1682613051000000009
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.00000001Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu10",
"host": "Hugin"
},
"timestamp": 1682613051000000010
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000011Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu11",
"host": "Hugin"
},
"timestamp": 1682613051000000011
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000012Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu12",
"host": "Hugin"
},
"timestamp": 1682613051000000012
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000013Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu13",
"host": "Hugin"
},
"timestamp": 1682613051000000013
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000014Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu14",
"host": "Hugin"
},
"timestamp": 1682613051000000014
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000015Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu15",
"host": "Hugin"
},
"timestamp": 1682613051000000015
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000999Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 99.62546816517232,
"usage_iowait": 0,
"usage_irq": 0.12484394506911513,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0.12484394506840547,
"usage_user": 0.12484394507124409
},
"name": "cpu",
"tags": {
"cpu": "cpu-total",
"host": "Hugin"
},
"timestamp": 1682613051000000999
}
}
]

View file

@ -0,0 +1,17 @@
cpu,cpu=cpu0,host=Hugin usage_softirq=0,usage_steal=0,usage_guest=0,usage_user=0,usage_idle=100,usage_nice=0,usage_iowait=0,usage_system=0,usage_irq=0,usage_guest_nice=0 1682613051000000000
cpu,cpu=cpu1,host=Hugin usage_user=0,usage_idle=100,usage_softirq=0,usage_steal=0,usage_guest_nice=0,usage_system=0,usage_nice=0,usage_iowait=0,usage_irq=0,usage_guest=0 1682613051000000001
cpu,cpu=cpu2,host=Hugin usage_system=0,usage_idle=100,usage_softirq=0,usage_steal=0,usage_guest=0,usage_guest_nice=0,usage_user=0,usage_nice=0,usage_iowait=0,usage_irq=0 1682613051000000002
cpu,cpu=cpu3,host=Hugin usage_idle=100,usage_nice=0,usage_iowait=0,usage_irq=0,usage_user=0,usage_system=0,usage_softirq=0,usage_steal=0,usage_guest=0,usage_guest_nice=0 1682613051000000003
cpu,cpu=cpu4,host=Hugin usage_user=0,usage_steal=0,usage_system=0,usage_idle=100,usage_nice=0,usage_iowait=0,usage_irq=0,usage_softirq=0,usage_guest=0,usage_guest_nice=0 1682613051000000004
cpu,cpu=cpu5,host=Hugin usage_user=0,usage_nice=0,usage_irq=0,usage_softirq=0,usage_guest_nice=0,usage_system=0,usage_idle=100,usage_iowait=0,usage_steal=0,usage_guest=0 1682613051000000005
cpu,cpu=cpu6,host=Hugin usage_user=0,usage_system=0,usage_iowait=0,usage_softirq=0,usage_steal=0,usage_guest=0,usage_guest_nice=0,usage_idle=100,usage_nice=0,usage_irq=0 1682613051000000006
cpu,cpu=cpu7,host=Hugin usage_system=0,usage_iowait=0,usage_softirq=0,usage_user=0,usage_nice=0,usage_irq=0,usage_steal=0,usage_guest=0,usage_guest_nice=0,usage_idle=100 1682613051000000007
cpu,cpu=cpu8,host=Hugin usage_guest_nice=0,usage_user=0,usage_iowait=0,usage_irq=0,usage_softirq=0,usage_guest=0,usage_system=0,usage_idle=100,usage_nice=0,usage_steal=0 1682613051000000008
cpu,cpu=cpu9,host=Hugin usage_user=0,usage_idle=100,usage_iowait=0,usage_irq=0,usage_guest_nice=0,usage_system=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_guest=0 1682613051000000009
cpu,cpu=cpu10,host=Hugin usage_softirq=0,usage_steal=0,usage_guest=0,usage_nice=0,usage_system=0,usage_idle=100,usage_iowait=0,usage_irq=0,usage_guest_nice=0,usage_user=0 1682613051000000010
cpu,cpu=cpu11,host=Hugin usage_guest=0,usage_guest_nice=0,usage_user=0,usage_idle=100,usage_nice=0,usage_iowait=0,usage_softirq=0,usage_steal=0,usage_system=0,usage_irq=0 1682613051000000011
cpu,cpu=cpu12,host=Hugin usage_softirq=0,usage_steal=0,usage_guest_nice=0,usage_user=0,usage_system=0,usage_nice=0,usage_irq=0,usage_idle=100,usage_iowait=0,usage_guest=0 1682613051000000012
cpu,cpu=cpu13,host=Hugin usage_iowait=0,usage_guest=0,usage_guest_nice=0,usage_steal=0,usage_user=0,usage_system=0,usage_idle=100,usage_nice=0,usage_irq=0,usage_softirq=0 1682613051000000013
cpu,cpu=cpu14,host=Hugin usage_system=0,usage_idle=100,usage_softirq=0,usage_steal=0,usage_guest=0,usage_user=0,usage_nice=0,usage_iowait=0,usage_irq=0,usage_guest_nice=0 1682613051000000014
cpu,cpu=cpu15,host=Hugin usage_user=0,usage_idle=100,usage_steal=0,usage_irq=0,usage_softirq=0,usage_guest=0,usage_guest_nice=0,usage_system=0,usage_nice=0,usage_iowait=0 1682613051000000015
cpu,cpu=cpu-total,host=Hugin usage_idle=99.62546816517232,usage_irq=0.12484394506911513,usage_softirq=0,usage_guest_nice=0,usage_steal=0,usage_guest=0,usage_user=0.12484394507124409,usage_system=0.12484394506840547,usage_nice=0,usage_iowait=0 1682613051000000999

View file

@ -0,0 +1,3 @@
[[outputs.dummy]]
batch = true
data_format = "cloudevents"

View file

@ -0,0 +1,112 @@
[
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metrics",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000999Z",
"data": [
{
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu0",
"host": "Hugin"
},
"timestamp": 1682613051000000000
},
{
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu1",
"host": "Hugin"
},
"timestamp": 1682613051000000001
},
{
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu2",
"host": "Hugin"
},
"timestamp": 1682613051000000002
},
{
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu3",
"host": "Hugin"
},
"timestamp": 1682613051000000003
},
{
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 99.62546816517232,
"usage_iowait": 0,
"usage_irq": 0.12484394506911513,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0.12484394506840547,
"usage_user": 0.12484394507124409
},
"name": "cpu",
"tags": {
"cpu": "cpu-total",
"host": "Hugin"
},
"timestamp": 1682613051000000999
}
]
}
]

View file

@ -0,0 +1,5 @@
cpu,cpu=cpu0,host=Hugin usage_softirq=0,usage_steal=0,usage_guest=0,usage_user=0,usage_idle=100,usage_nice=0,usage_iowait=0,usage_system=0,usage_irq=0,usage_guest_nice=0 1682613051000000000
cpu,cpu=cpu1,host=Hugin usage_user=0,usage_idle=100,usage_softirq=0,usage_steal=0,usage_guest_nice=0,usage_system=0,usage_nice=0,usage_iowait=0,usage_irq=0,usage_guest=0 1682613051000000001
cpu,cpu=cpu2,host=Hugin usage_system=0,usage_idle=100,usage_softirq=0,usage_steal=0,usage_guest=0,usage_guest_nice=0,usage_user=0,usage_nice=0,usage_iowait=0,usage_irq=0 1682613051000000002
cpu,cpu=cpu3,host=Hugin usage_idle=100,usage_nice=0,usage_iowait=0,usage_irq=0,usage_user=0,usage_system=0,usage_softirq=0,usage_steal=0,usage_guest=0,usage_guest_nice=0 1682613051000000003
cpu,cpu=cpu-total,host=Hugin usage_idle=99.62546816517232,usage_irq=0.12484394506911513,usage_softirq=0,usage_guest_nice=0,usage_steal=0,usage_guest=0,usage_user=0.12484394507124409,usage_system=0.12484394506840547,usage_nice=0,usage_iowait=0 1682613051000000999

View file

@ -0,0 +1,5 @@
[[outputs.dummy]]
batch = true
data_format = "cloudevents"
cloudevents_batch_format = "metrics"

View file

@ -0,0 +1,79 @@
{
"$ref": "#/definitions/event",
"definitions": {
"specversion": {
"type": "string",
"minLength": 1
},
"datacontenttype": {
"type": "string"
},
"data": {
"type": ["object", "string"]
},
"event": {
"properties": {
"specversion": {
"$ref": "#/definitions/specversion"
},
"datacontenttype": {
"$ref": "#/definitions/datacontenttype"
},
"data": {
"$ref": "#/definitions/data"
},
"id": {
"$ref": "#/definitions/id"
},
"time": {
"$ref": "#/definitions/time"
},
"schemaurl": {
"$ref": "#/definitions/schemaurl"
},
"subject": {
"$ref": "#/definitions/subject"
},
"type": {
"$ref": "#/definitions/type"
},
"extensions": {
"$ref": "#/definitions/extensions"
},
"source": {
"$ref": "#/definitions/source"
}
},
"required": ["specversion", "id", "type", "source"],
"type": "object"
},
"id": {
"type": "string",
"minLength": 1
},
"time": {
"format": "date-time",
"type": "string"
},
"schemaurl": {
"type": "string",
"format": "uri-reference"
},
"subject": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"minLength": 1
},
"extensions": {
"type": "object"
},
"source": {
"format": "uri-reference",
"type": "string"
}
},
"type": "object"
}

View file

@ -0,0 +1,128 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "CloudEvents Specification JSON Schema",
"type": "object",
"properties": {
"id": {
"description": "Identifies the event.",
"$ref": "#/definitions/iddef",
"examples": [
"A234-1234-1234"
]
},
"source": {
"description": "Identifies the context in which an event happened.",
"$ref": "#/definitions/sourcedef",
"examples" : [
"https://github.com/cloudevents",
"mailto:cncf-wg-serverless@lists.cncf.io",
"urn:uuid:6e8bc430-9c3a-11d9-9669-0800200c9a66",
"cloudevents/spec/pull/123",
"/sensors/tn-1234567/alerts",
"1-555-123-4567"
]
},
"specversion": {
"description": "The version of the CloudEvents specification which the event uses.",
"$ref": "#/definitions/specversiondef",
"examples": [
"1.0"
]
},
"type": {
"description": "Describes the type of event related to the originating occurrence.",
"$ref": "#/definitions/typedef",
"examples" : [
"com.github.pull_request.opened",
"com.example.object.deleted.v2"
]
},
"datacontenttype": {
"description": "Content type of the data value. Must adhere to RFC 2046 format.",
"$ref": "#/definitions/datacontenttypedef",
"examples": [
"text/xml",
"application/json",
"image/png",
"multipart/form-data"
]
},
"dataschema": {
"description": "Identifies the schema that data adheres to.",
"$ref": "#/definitions/dataschemadef"
},
"subject": {
"description": "Describes the subject of the event in the context of the event producer (identified by source).",
"$ref": "#/definitions/subjectdef",
"examples": [
"mynewfile.jpg"
]
},
"time": {
"description": "Timestamp of when the occurrence happened. Must adhere to RFC 3339.",
"$ref": "#/definitions/timedef",
"examples": [
"2018-04-05T17:31:00Z"
]
},
"data": {
"description": "The event payload.",
"$ref": "#/definitions/datadef",
"examples": [
"<much wow=\"xml\"/>"
]
},
"data_base64": {
"description": "Base64 encoded event payload. Must adhere to RFC4648.",
"$ref": "#/definitions/data_base64def",
"examples": [
"Zm9vYg=="
]
}
},
"required": ["id", "source", "specversion", "type"],
"definitions": {
"iddef": {
"type": "string",
"minLength": 1
},
"sourcedef": {
"type": "string",
"format": "uri-reference",
"minLength": 1
},
"specversiondef": {
"type": "string",
"minLength": 1
},
"typedef": {
"type": "string",
"minLength": 1
},
"datacontenttypedef": {
"type": ["string", "null"],
"minLength": 1
},
"dataschemadef": {
"type": ["string", "null"],
"format": "uri",
"minLength": 1
},
"subjectdef": {
"type": ["string", "null"],
"minLength": 1
},
"timedef": {
"type": ["string", "null"],
"format": "date-time",
"minLength": 1
},
"datadef": {
"type": ["object", "string", "number", "array", "boolean", "null"]
},
"data_base64def": {
"type": ["string", "null"],
"contentEncoding": "base64"
}
}
}

View file

@ -0,0 +1,478 @@
[
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu0",
"host": "Hugin"
},
"timestamp": 1682613051000000000
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000001Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu1",
"host": "Hugin"
},
"timestamp": 1682613051000000001
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000002Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu2",
"host": "Hugin"
},
"timestamp": 1682613051000000002
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000003Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu3",
"host": "Hugin"
},
"timestamp": 1682613051000000003
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000004Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu4",
"host": "Hugin"
},
"timestamp": 1682613051000000004
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000005Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu5",
"host": "Hugin"
},
"timestamp": 1682613051000000005
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000006Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu6",
"host": "Hugin"
},
"timestamp": 1682613051000000006
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000007Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu7",
"host": "Hugin"
},
"timestamp": 1682613051000000007
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000008Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu8",
"host": "Hugin"
},
"timestamp": 1682613051000000008
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000009Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu9",
"host": "Hugin"
},
"timestamp": 1682613051000000009
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.00000001Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu10",
"host": "Hugin"
},
"timestamp": 1682613051000000010
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000011Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu11",
"host": "Hugin"
},
"timestamp": 1682613051000000011
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000012Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu12",
"host": "Hugin"
},
"timestamp": 1682613051000000012
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000013Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu13",
"host": "Hugin"
},
"timestamp": 1682613051000000013
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000014Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu14",
"host": "Hugin"
},
"timestamp": 1682613051000000014
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000015Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu15",
"host": "Hugin"
},
"timestamp": 1682613051000000015
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000999Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 99.62546816517232,
"usage_iowait": 0,
"usage_irq": 0.12484394506911513,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0.12484394506840547,
"usage_user": 0.12484394507124409
},
"name": "cpu",
"tags": {
"cpu": "cpu-total",
"host": "Hugin"
},
"timestamp": 1682613051000000999
}
}
]

View file

@ -0,0 +1,17 @@
cpu,cpu=cpu0,host=Hugin usage_softirq=0,usage_steal=0,usage_guest=0,usage_user=0,usage_idle=100,usage_nice=0,usage_iowait=0,usage_system=0,usage_irq=0,usage_guest_nice=0 1682613051000000000
cpu,cpu=cpu1,host=Hugin usage_user=0,usage_idle=100,usage_softirq=0,usage_steal=0,usage_guest_nice=0,usage_system=0,usage_nice=0,usage_iowait=0,usage_irq=0,usage_guest=0 1682613051000000001
cpu,cpu=cpu2,host=Hugin usage_system=0,usage_idle=100,usage_softirq=0,usage_steal=0,usage_guest=0,usage_guest_nice=0,usage_user=0,usage_nice=0,usage_iowait=0,usage_irq=0 1682613051000000002
cpu,cpu=cpu3,host=Hugin usage_idle=100,usage_nice=0,usage_iowait=0,usage_irq=0,usage_user=0,usage_system=0,usage_softirq=0,usage_steal=0,usage_guest=0,usage_guest_nice=0 1682613051000000003
cpu,cpu=cpu4,host=Hugin usage_user=0,usage_steal=0,usage_system=0,usage_idle=100,usage_nice=0,usage_iowait=0,usage_irq=0,usage_softirq=0,usage_guest=0,usage_guest_nice=0 1682613051000000004
cpu,cpu=cpu5,host=Hugin usage_user=0,usage_nice=0,usage_irq=0,usage_softirq=0,usage_guest_nice=0,usage_system=0,usage_idle=100,usage_iowait=0,usage_steal=0,usage_guest=0 1682613051000000005
cpu,cpu=cpu6,host=Hugin usage_user=0,usage_system=0,usage_iowait=0,usage_softirq=0,usage_steal=0,usage_guest=0,usage_guest_nice=0,usage_idle=100,usage_nice=0,usage_irq=0 1682613051000000006
cpu,cpu=cpu7,host=Hugin usage_system=0,usage_iowait=0,usage_softirq=0,usage_user=0,usage_nice=0,usage_irq=0,usage_steal=0,usage_guest=0,usage_guest_nice=0,usage_idle=100 1682613051000000007
cpu,cpu=cpu8,host=Hugin usage_guest_nice=0,usage_user=0,usage_iowait=0,usage_irq=0,usage_softirq=0,usage_guest=0,usage_system=0,usage_idle=100,usage_nice=0,usage_steal=0 1682613051000000008
cpu,cpu=cpu9,host=Hugin usage_user=0,usage_idle=100,usage_iowait=0,usage_irq=0,usage_guest_nice=0,usage_system=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_guest=0 1682613051000000009
cpu,cpu=cpu10,host=Hugin usage_softirq=0,usage_steal=0,usage_guest=0,usage_nice=0,usage_system=0,usage_idle=100,usage_iowait=0,usage_irq=0,usage_guest_nice=0,usage_user=0 1682613051000000010
cpu,cpu=cpu11,host=Hugin usage_guest=0,usage_guest_nice=0,usage_user=0,usage_idle=100,usage_nice=0,usage_iowait=0,usage_softirq=0,usage_steal=0,usage_system=0,usage_irq=0 1682613051000000011
cpu,cpu=cpu12,host=Hugin usage_softirq=0,usage_steal=0,usage_guest_nice=0,usage_user=0,usage_system=0,usage_nice=0,usage_irq=0,usage_idle=100,usage_iowait=0,usage_guest=0 1682613051000000012
cpu,cpu=cpu13,host=Hugin usage_iowait=0,usage_guest=0,usage_guest_nice=0,usage_steal=0,usage_user=0,usage_system=0,usage_idle=100,usage_nice=0,usage_irq=0,usage_softirq=0 1682613051000000013
cpu,cpu=cpu14,host=Hugin usage_system=0,usage_idle=100,usage_softirq=0,usage_steal=0,usage_guest=0,usage_user=0,usage_nice=0,usage_iowait=0,usage_irq=0,usage_guest_nice=0 1682613051000000014
cpu,cpu=cpu15,host=Hugin usage_user=0,usage_idle=100,usage_steal=0,usage_irq=0,usage_softirq=0,usage_guest=0,usage_guest_nice=0,usage_system=0,usage_nice=0,usage_iowait=0 1682613051000000015
cpu,cpu=cpu-total,host=Hugin usage_idle=99.62546816517232,usage_irq=0.12484394506911513,usage_softirq=0,usage_guest_nice=0,usage_steal=0,usage_guest=0,usage_user=0.12484394507124409,usage_system=0.12484394506840547,usage_nice=0,usage_iowait=0 1682613051000000999

View file

@ -0,0 +1,2 @@
[[outputs.dummy]]
data_format = "cloudevents"

View file

@ -0,0 +1,30 @@
[
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "myownsource",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 99.62546816517232,
"usage_iowait": 0,
"usage_irq": 0.12484394506911513,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0.12484394506840547,
"usage_user": 0.12484394507124409
},
"name": "cpu",
"tags": {
"cpu": "cpu-total",
"host": "Hugin"
},
"timestamp": 1682613051000000000
},
"time": "2023-04-27T16:30:51Z"
}
]

View file

@ -0,0 +1 @@
cpu,cpu=cpu-total,host=Hugin usage_idle=99.62546816517232,usage_irq=0.12484394506911513,usage_softirq=0,usage_guest_nice=0,usage_steal=0,usage_guest=0,usage_user=0.12484394507124409,usage_system=0.12484394506840547,usage_nice=0,usage_iowait=0 1682613051000000000

View file

@ -0,0 +1,3 @@
[[outputs.dummy]]
data_format = "cloudevents"
cloudevents_source = "myownsource"

View file

@ -0,0 +1,142 @@
[
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "cpu0",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu0",
"host": "Hugin"
},
"timestamp": 1682613051000000000
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "cpu1",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000001Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu1",
"host": "Hugin"
},
"timestamp": 1682613051000000001
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "cpu2",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000002Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu2",
"host": "Hugin"
},
"timestamp": 1682613051000000002
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "cpu3",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000003Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 100,
"usage_iowait": 0,
"usage_irq": 0,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0,
"usage_user": 0
},
"name": "cpu",
"tags": {
"cpu": "cpu3",
"host": "Hugin"
},
"timestamp": 1682613051000000003
}
},
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "cpu-total",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"time": "2023-04-27T16:30:51.000000999Z",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 99.62546816517232,
"usage_iowait": 0,
"usage_irq": 0.12484394506911513,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0.12484394506840547,
"usage_user": 0.12484394507124409
},
"name": "cpu",
"tags": {
"cpu": "cpu-total",
"host": "Hugin"
},
"timestamp": 1682613051000000999
}
}
]

View file

@ -0,0 +1,5 @@
cpu,cpu=cpu0,host=Hugin usage_softirq=0,usage_steal=0,usage_guest=0,usage_user=0,usage_idle=100,usage_nice=0,usage_iowait=0,usage_system=0,usage_irq=0,usage_guest_nice=0 1682613051000000000
cpu,cpu=cpu1,host=Hugin usage_user=0,usage_idle=100,usage_softirq=0,usage_steal=0,usage_guest_nice=0,usage_system=0,usage_nice=0,usage_iowait=0,usage_irq=0,usage_guest=0 1682613051000000001
cpu,cpu=cpu2,host=Hugin usage_system=0,usage_idle=100,usage_softirq=0,usage_steal=0,usage_guest=0,usage_guest_nice=0,usage_user=0,usage_nice=0,usage_iowait=0,usage_irq=0 1682613051000000002
cpu,cpu=cpu3,host=Hugin usage_idle=100,usage_nice=0,usage_iowait=0,usage_irq=0,usage_user=0,usage_system=0,usage_softirq=0,usage_steal=0,usage_guest=0,usage_guest_nice=0 1682613051000000003
cpu,cpu=cpu-total,host=Hugin usage_idle=99.62546816517232,usage_irq=0.12484394506911513,usage_softirq=0,usage_guest_nice=0,usage_steal=0,usage_guest=0,usage_user=0.12484394507124409,usage_system=0.12484394506840547,usage_nice=0,usage_iowait=0 1682613051000000999

View file

@ -0,0 +1,3 @@
[[outputs.dummy]]
data_format = "cloudevents"
cloudevents_source_tag = "cpu"

View file

@ -0,0 +1,30 @@
[
{
"specversion": "1.0",
"id": "845f6aca-e52a-11ed-9976-d8bbc1a4a0c6",
"source": "telegraf",
"type": "com.influxdata.telegraf.metric",
"datacontenttype": "application/json",
"data": {
"fields": {
"usage_guest": 0,
"usage_guest_nice": 0,
"usage_idle": 99.62546816517232,
"usage_iowait": 0,
"usage_irq": 0.12484394506911513,
"usage_nice": 0,
"usage_softirq": 0,
"usage_steal": 0,
"usage_system": 0.12484394506840547,
"usage_user": 0.12484394507124409
},
"name": "cpu",
"tags": {
"cpu": "cpu-total",
"host": "Hugin"
},
"timestamp": 1682613051000000000
},
"time": "2023-04-27T16:30:51Z"
}
]

View file

@ -0,0 +1 @@
cpu,cpu=cpu-total,host=Hugin usage_idle=99.62546816517232,usage_irq=0.12484394506911513,usage_softirq=0,usage_guest_nice=0,usage_steal=0,usage_guest=0,usage_user=0.12484394507124409,usage_system=0.12484394506840547,usage_nice=0,usage_iowait=0 1682613051000000000

View file

@ -0,0 +1,2 @@
[[outputs.dummy]]
data_format = "cloudevents"