Skip to content

pokutuna/MackerelAppActivity.app

Repository files navigation

MackerelAppActivity.app

Post the number of key types for each application to mackerel.io as ServiceMetric

Inspired from http://songmu.github.io/slides/mackerel-3/#0

activity_graph

Installation

Download Application

MackerelAppActivity.app

Put ~/.mackerel-app-activity.json

{
    "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
}

Enable Accessibility

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

goal

...Or Using Homebrew Cask

https://github.com/aereal/homebrew-mackerelappactivity

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published