Skip to main content

CLI for the OpenFin Log Management Service

Project description

OpenFin Log Management CLI

Overview

The OpenFin Log Management CLI allows users to interact with the Log Management service via the command line. Apps that have log management enabled will have their logs encrypted and uploaded to the log management service after the RVM closes. This CLI can be used to list logs stored by app names and/or desktops, and to download and decrypt those log files so that the app provider can read and use them for debugging purposes.

Assumptions

The following are requirements for using the CLI tool:

  • Python 2.7 must be installed.
  • Run pip install oflog to install the CLI tool.

Features

  • List application names, and list desktop id's for a given app name.
  • List logs for a given application.
  • Download and decrypt zipped files from the log management service.

Upgrading

  • To upgrade to a newer version, run pip install --upgrade oflog

Getting started

File Structure

  • openfin_log_cli.py: cli tool entry point.
  • config.ini: file that contains default configuration information, including log manager url, api key, and private key file.

Configuration

Run oflog --configure and answer the prompts for base-url, api-key, and private-key to configure the cli. Configuration is stored in ~/.openfin/config.ini

Usage

All commands return JSON responses from the log management service. All commands require at least the base url and the api key to be configured either in config.ini or the arguments --base-url or --api-key. For downloading logs, an RSA private key file in PEM form must also be configured in either config.ini or the argument --private-key. If the aforementioned configuration items are provided both in the config.ini file and as a command line argument, the command line argument will take precedence.

Commands

  • oflog --get-app-names: list all the application names.
  • oflog --get-app-desktops --app-name <name>: list all the desktops for a given app name.
  • oflog --get-desktop-logs --app-name <name> --desktop-id <id>: list all the logs for a given app name / desktop combination.
  • oflog --get-logs --app-name <name>: get all the logs for a given app name.
  • oflog --download-log <log-id>: download a log with the given id and decrypt it with the provided private key file.

Other arguments

  • --start-date: causes --get-logs and --get-desktop-logs to only show logs past that start date.
  • --end-date: causes --get-logs and --get-desktop-logs to only show logs before that end date. Can be used in conjunction with --start-date.
  • --private-key: location of RSA private key in PEM form, used to decrypt logs. This flag overrides the private key set in config.ini.
  • --base-url: base url for api calls. This flag overrides the url set in config.ini.
  • --api-key: api key for api calls. This flag overrides the api key set in config.ini.
  • --version: shows the version of the CLI tool.
  • --help: shows descriptions of commands and arguments.

Contributing

This is an open source project and all are encouraged to contribute.

Development

You can test any changes that you make locally by substituting oflog by running the openfin_log_cli.py file (e.g. calling the CLI like so: python log_manager_cli\openfin_log_cli.py <args>).

License

This project uses the Apache2 license. By downloading OpenFin, you agree to the terms of our Developer License.

Support

Please enter an issue in the repo for any questions or problems. Alternatively, please contact us at support@openfin.co

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oflog-0.3.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oflog-0.3.0-py2-none-any.whl (7.1 kB view details)

Uploaded Python 2

File details

Details for the file oflog-0.3.0.tar.gz.

File metadata

  • Download URL: oflog-0.3.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/2.7.13

File hashes

Hashes for oflog-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a8bffb06cb0fb38008c32639821c7581894ce8a02e94b69d476f1bab8e88796d
MD5 1d92bd8f6073956d11e646aa5f3733b8
BLAKE2b-256 a9d5e4abe9b1fabf931fb94359b371cd800b60c4869b1c947c3decd9a4ced10f

See more details on using hashes here.

File details

Details for the file oflog-0.3.0-py2-none-any.whl.

File metadata

  • Download URL: oflog-0.3.0-py2-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/2.7.13

File hashes

Hashes for oflog-0.3.0-py2-none-any.whl
Algorithm Hash digest
SHA256 3115dbd102776823e2a9e863b6a64b36d2ee24d98b4e4a4d127b14ac34089215
MD5 dc96c492545713e5b6a31c0ef77dc8e4
BLAKE2b-256 13cac255cb79aa0c4246312c2d58e29baebdf7cc0fb8faaf30ec0049654530c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page