Skip to content

Instantly share code, notes, and snippets.

@ayushi24041992
Last active May 17, 2019 07:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayushi24041992/d791a71780a77db8ea0f9ca51c8e8fa8 to your computer and use it in GitHub Desktop.
Save ayushi24041992/d791a71780a77db8ea0f9ca51c8e8fa8 to your computer and use it in GitHub Desktop.
global:
config_version: 2
input:
type: file
path: temperatureSpike.log
readall: true # Read from the beginning of the file? False means we start at the end of the file and read only new lines.
grok:
patterns_dir: ./patterns/
metrics:
- type: gauge
name: device_temperature_detail
help: Temperature Detail of different devices represented by device ID.
match: 'Device %{USERNAME:deviceId} has %{NUMBER:temperature} temperature'
value: '{{.temperature}}'
labels:
system_id: '{{.deviceId}}'
server:
host: localhost
port: 9144
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment