Post the number of key types for each application to mackerel.io as ServiceMetric
Inspired from http://songmu.github.io/slides/mackerel-3/#0
{
"ApiKey": "hogehogefugafugapiyopiyo",
"ServiceName": "clients", // your service name in mackerel.io
"MetricPrefix": "activity.types.", // set a graph name prefix
// A default metric name is the last part of `BundlerIdentifier`.
// (e.g `com.pokutuna.MackerelAppActivity` -> `MackerelAppActivity`)
// Define mappings if you want to rename metric
"NameMapping": {
"slackmacgap": "Slack",
"LimeChat-AppStore": "LimeChat",
"keychainaccess": "" // Set an empty string to avoid posting
},
"PostIntervalMinutes": 1
}
OS X requires Accessibility
for monitoring global key events.
- open
System Preferences
>Security & Privacy
- click the lock icon to change settings
- select
Accessibility
from the left list - drag and drop the app to the right list
- check its checkbox
https://github.com/aereal/homebrew-mackerelappactivity