This is a generic application to be a target for monitoring tools.
- Dump a stack trace to
./logs/dynatracer.log
- Dump a stack trace to
./logs/stacktraces.log
- Spike the CPU for 10 seconds
- Throw a New Relic error
- Set the
some_gauge
metric to 20 or 40
Shows on-call info for the groups defined in ./data/data.json
.
- git
- node and npm
git clone https://github.com/xMTinkerer/octoapp.git
cd octoapp
npm install
Per the package.json
, just fire up with npm
. Pass USERNAME
and PASSWORD
to set the login credentials and XM_USERNAME
, XM_PASSWORD
, and XM_HOST
for pulling the on-call information:
XM_USERNAME=xm_user XM_PASSWORD=password XM_HOST=acme.xmatters.com USERNAME=user PASSWORD=password npm start
Then navigate your browser to http://localhost:9988
and pick a button.
Create a newrelic.js
file with the following text. Substituting the license_key
as needed:
'use strict'
/**
* New Relic agent configuration.
*
* See lib/config.defaults.js in the agent distribution for a more complete
* description of configuration variables and their potential values.
*/
exports.config = {
/**
* Array of application names.
*/
app_name: ['octoapp'],
/**
* Your New Relic license key.
*/
license_key: 'LICENSE KEY HERE',
logging: {
/**
* Level at which to log. 'trace' is most useful to New Relic when diagnosing
* issues with the agent, 'info' and higher will impose the least overhead on
* production applications.
*/
level: 'info'
}
}
Add this section to the $PROMETHEUS_HOME/prometheus.yml
file:
- job_name: 'octoapp'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 2s
#scrape_timeout: 5s
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['localhost:9988']
labels:
group: 'octo'