Skip to content

Instantly share code, notes, and snippets.

[Outlier Detected] CPU has deviated for {{register.name}} | ({{value}})% - Store: {{store.name}} | {{state.name}}
System CPU is rising to a higher-than-desirable level for instance {{register.name}}.
******************************************************
# **Store Details**
* **Store Number:** {{store.name}}
* **Store Region:** {{region.name}}
init_config:
instances:
- host: localhost
port: 6379
# Can be used in lieu of host/port
#
# unix_socket_path: /var/run/redis/redis.sock # optional, can be used in lieu of host/port
{
"requests": [
{
"q": "avg:system.load.1{*}",
"type": "bars",
"conditional_formats": [],
"aggregator": "avg"
},
{
"q": "week_before(avg:system.load.1{*})",
#!/bin/sh
# Make sure you replace the API and/or APP key below
# with the ones for your account
curl -X POST -H "Content-type: application/json" \
-d '{
"title": "Did you hear the news today - test4?",
"text": "Oh man!",
"priority": "normal",
"tags": ["environment:test"],
@DBLaw
DBLaw / datadog-digest-v5.py
Created July 7, 2016 17:32
Pull data from the ThousandEyes API and push to Datadog
#!/usr/bin/python
apiVersion = 'v5'
apiURL = 'https://api.thousandeyes.com'
urlBase = apiURL + '/' + apiVersion + '/'
logLevel = 3
requestCount = 0
uploadLimit = 10000
@DBLaw
DBLaw / datadog-nginx
Created November 10, 2015 19:36 — forked from gane5h/datadog-nginx
Nginx log parsing with datadog
"""
Custom parser for nginx log suitable for use by Datadog 'dogstreams'.
To use, add to datadog.conf as follows:
dogstreams: [path to ngnix log (e.g: "/var/log/nginx/access.log"]:[path to this python script (e.g "/usr/share/datadog/agent/dogstream/nginx.py")]:[name of parsing method of this file ("parse")]
so, an example line would be:
dogstreams: /var/log/nginx/access.log:/usr/share/datadog/agent/dogstream/nginx.py:parse
Log of nginx should be defined like that:
log_format time_log '$time_local "$request" S=$status $bytes_sent T=$request_time R=$http_x_forwarded_for';
when starting dd-agent, you can find the collector.log and check if the dogstream initialized successfully
"""
{
"requests": [
{
"q": "sum:system.cpu.idle{*} / avg:system.cpu.idle{*}",
"type": "line"
}
],
"viz": "timeseries"
}
Linux OID's (these tend to work for network devices like F5 too)
CPU Statistics
1 minute Load: .1.3.6.1.4.1.2021.10.1.3.1
5 minute Load: .1.3.6.1.4.1.2021.10.1.3.2
15 minute Load: .1.3.6.1.4.1.2021.10.1.3.3
CPU
percentage of user CPU time: .1.3.6.1.4.1.2021.11.9.0
{
"requests": [
{
"q": "avg:system.cpu.system{*}",
"type": "line"
},
{
"q": "hour_before(avg:system.cpu.system{*})",
"type": "line"
}
init_config:
instances:
- name: datadogproc
search_string: ['ddagent.exe']