This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
receivers: | |
iis: | |
collection_interval: 30s | |
hostmetrics: | |
collection_interval: 30s | |
scrapers: | |
cpu: | |
disk: | |
load: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HTTP input to file_output | |
# | |
# Test with: | |
# curl -v localhost:9090 -XPOST -d '{"message":"hello world"}' | |
# | |
pipeline: | |
- type: http_input | |
listen_address: 0.0.0.0:9090 | |
# uncomment to enable basic auth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TCP input to file_output | |
# | |
# Test with nc or netcat: | |
# echo "hello world" | nc localhost 9000 | |
# | |
pipeline: | |
- type: tcp_input | |
listen_address: 0.0.0.0:9000 | |
# remove `add_labels` to omit the following labels: | |
# net.host.ip, net.host.port, net.peer.ip, net.peer.port, net.transport |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# UDP input to file_output | |
# | |
# Test with nc or netcat: | |
# echo "hello world" | nc -u localhost 8000 | |
# | |
pipeline: | |
- type: udp_input | |
listen_address: 0.0.0.0:8000 | |
# remove `add_labels` to omit the following labels: | |
# net.host.ip, net.host.port, net.peer.ip, net.peer.port, net.transport |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- expr: $$body.status == "200" or $$body.status == "302" or $$body.status == "304" or $$body.status == "301" | |
type: filter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- type: udp_input | |
listen_address: '0.0.0.0:514' | |
labels: | |
plugin_id: custom | |
add_labels: true | |
- id: syslog_regex_priority_parser | |
type: regex_parser | |
if: '$record matches "^<\\d+>.*"' | |
regex: '^<(?P<priority>[\d]+)>(?P<timestamp>\w{3}\s\d{2}\s\d{2}:\d{2}:\d{2})\s+(?P<hostname>[^\s]+)\s+(?P<protocol>[^\(]+)\((?P<port>[^\)]+)\)\s+Data:\s+(?P<message>.*)' | |
parse_from: $record |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline: | |
- type: file_input | |
include: | |
- /root/test.log | |
- /root/test2.log | |
- /root/log/* | |
exclude: | |
- '/root/log/*.gz' | |
# On first startup, start at the end of each file (do not read | |
# old logs). The agent will pickup where it left off if stopped |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline: | |
- type: file_input | |
include: | |
- /root/test.log | |
- /root/test2.log | |
- /root/log/* | |
exclude: | |
- '/root/log/*.gz' | |
# On first startup, start at the end of each file (do not read | |
# old logs). The agent will pickup where it left off if stopped |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tcp | |
import ( | |
"fmt" | |
"context" | |
"net" | |
"sync" | |
"github.com/observiq/stanza/entry" | |
"github.com/observiq/stanza/errors" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
docker rm -f $(docker ps -qa) | |
docker volume rm $(docker volume ls -q) | |
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke" | |
for dir in $cleanupdirs; do | |
echo "Removing $dir" | |
rm -rf $dir | |
done |