1.0.4 • Published 7 years ago

conctr v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

Conctr

Conctr is a one stop platform that takes care of IoT complexity and lets you focus on what’s important. The Conctr library allows you to easily integrate your agent and device code with the Conctr IoT Platform. This library provides an easy way to send data to a Conctr application.

Click here for the full documentation of the Conctr API.

Installation

$ npm install conctr

Init

Initializes the credentials for an application as a profile in ~/.conctr/config.json. You can set up multiple profiles using this walk through.

Example

$ conctr init

Logs

Retrieves logs for a Conctr application. There are a few optional flags that can be used to filter the logs.

FlagAliasDefault ValueDescription
start-snowStart time for logs. Defaults to now. Accepts human readable time specification as well as standard ISO8601 strings. See below for options.
end-eEnd time for logs. If not set logs will be retrieved as they come in.
env-EstagingConctr environment to connect to. Either dev or staging.
filter-fA valid CloudWatch Logs filter pattern to use for filtering the response. If not provided, all the events are matched.
help-hShow this help message and exit.
application_id-uConctr application id. Overrides the environment variable CONCTR_APP_ID & any application profile set
api_key-pConctr api key. Overrides the environment variable CONCTR_API_KEY & any application profile set
profile-PdefaultApplication profile to use for credentials

####Examples

$ conctr logs -h # See help menu

$ conctr logs -u <app_id_here> -p <api_key_here> # Override credentials

$ conctr logs --env dev --profile dev-logs # Get dev logs using the correct profile

$ conctr logs -s 1h # Get logs for the last hour

$ conctr logs -s 1m # Get logs for the last minute

$ conctr logs -s 1d # Get logs for the last day

$ conctr logs -s "1h 20m" # Get logs for the last hour and 20 minutes

$ conctr logs -s "2hr -40mins" # Get logs for the last hour and 20 minutes (2hours minus 40 minutes)

$ conctr logs -s 1h -f error # Get logs for the last hour which have contain the substring "error"

In case of any questions/issues with the package please contact us at support@conctr.com

License

The Conctr library is licensed under the MIT License.