Skip to content

A console for tracking and inspecting the queries being made by applications by tailing and log files.

License

Notifications You must be signed in to change notification settings

mcclayton/query-console

Repository files navigation

code style: prettier

Prettier is run as a pre-commit hook to automatically change staged files to adhere to our base code style rules.

Query Console

A console for tracking and inspecting the queries being made by applications via tailing and parsing log files.

Screenshot

Getting Started

  • Install query-console globally:
npm install -g query-console
  • Create a config JSON file specifying your query tracker information: service: The name of the service being monitored. log_path: The absolute path of the log file to tail and parse. (Note: Tilde path expansion is not supported) regexes: The regular expression to use for determining whether or not a log line is a query.
{
  "query_trackers": [
    {
      "service": "Application One",
      "log_path": "/Desktop/app-one/log/development.log",
      "regexes": [
        {
          "expression": ".*(select|create|update|delete|insert)\\b",
          "ignore_case": true
        }
      ]
    },
    {
      "service": "Application Two",
      "log_path": "/Desktop/app-two/log/development.log",
      "regexes": [
        {
          "expression": ".*(FROM|WHERE)\\b",
          "ignore_case": false
        }
      ]
    }
  ]
}
  • Then start query-console with:
query-console -c /Desktop/config.json

-c specifies the absolute path to the config file (Note: Tilde path expansion is not supported)

Now open up your browser to localhost:3005 to view Query Console 🚀

You can also specify a different port using the -p flag. query-console -c /Desktop/config.json -p 3000

Note: This would start the Client Server on port 3000, and the API Server on the next port (i.e. 3001)

About

A console for tracking and inspecting the queries being made by applications by tailing and log files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published