Replace accountId and of course, test out the rule to match your use case
mutation {
nrqlDropRulesCreate(accountId: 1147177, rules: [
{
action: DROP_DATA
nrql: "SELECT * FROM TestEvent WHERE appName='NR-One Production'"
add your own license key
EU region - change the request url to https://log-api.eu.newrelic.com/log/v1
curl --location --request POST 'https://log-api.newrelic.com/log/v1' \
{ | |
"dashboard": { | |
"metadata": { "version": 1 }, | |
"title": "k6 Sample Dashboard", | |
"icon": "line-chart", | |
"visibility": "all", | |
"editable": "editable_by_all", | |
"filter": null, | |
"widgets": [ | |
{ |
Assumptions: a New Relic account and Ubuntu 18. Works on a t2.micro
k6 installation instructions from their docs
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61
echo "deb https://dl.bintray.com/loadimpact/deb stable main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install k6
import requests, json | |
graphQLEndpoint = 'https://api.newrelic.com/graphql' | |
#graphQLEndpoint = 'https://api.eu.newrelic.com/graphql' | |
APIKey = '<your key here>' | |
headers = { | |
"Content-Type": 'application/json', | |
"API-Key": APIKey | |
} |
Assumptions: Ubuntu 18 and New Relic Infra already installed.
Install SNMP, SNMP daemon, optionally mibs downloader
sudo apt install snmpd snmp snmp-mibs-downloader
Replace snmpd.conf with contents of below file. Really we are just commenting out line 15 and uncommenting line 17. Adding line 64 and line 185.
integrations: | |
- name: apache-server-metrics | |
integration_name: com.newrelic.apache | |
command: metrics | |
arguments: | |
status_url: http://127.0.0.1:90/server-status?auto | |
remote_monitoring: true | |
labels: | |
env: production | |
role: load_balancer |
var parseString = require('xml2js').parseString; | |
var $http = require('request'); | |
// Get the New Relic status RSS feed | |
$http.get('https://www.food.gov.uk/rss-feed/alerts-allergy', function(err, response, body) { | |
parseString(body, function(err, result){ | |
// Parse the RSS, and get the latest incident | |
var latestIncident = result.rss.channel[0].item[0]; | |
// Push the incident details to Insights |
POST /synthetics/api/v3/monitors HTTP/1.1 | |
Host: synthetics.newrelic.com | |
X-Api-Key: {{apiKey}} | |
Content-Type: application/json | |
{ | |
"name": "Gary Homepage", | |
"type": "SIMPLE", | |
"frequency": 30, | |
"uri": "https://my-lab-4-hostname.com:8080/wordpress/", | |
"locations": ["AWS_US_WEST_1","AWS_EU_WEST_2"], |
https://synthetics.newrelic.com/synthetics/api/v3/monitors | |
Header: | |
X-Api-Key {{apiKey}} | |
Content-Type application/json | |
Body: | |
{ | |
"name": "Gary Homepage", | |
"type": "SIMPLE", | |
"frequency": 30, | |
"uri": "https://my-lab-4-hostname.com:8080/wordpress/", |