conctr

1.0.4 • Public • Published

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.

Flag Alias Default Value Description
start -s now Start time for logs. Defaults to now. Accepts human readable time specification as well as standard ISO8601 strings. See below for options.
end -e End time for logs. If not set logs will be retrieved as they come in.
env -E staging Conctr environment to connect to. Either dev or staging.
filter -f A valid CloudWatch Logs filter pattern to use for filtering the response. If not provided, all the events are matched.
help -h Show this help message and exit.
application_id -u Conctr application id. Overrides the environment variable CONCTR_APP_ID & any application profile set
api_key -p Conctr api key. Overrides the environment variable CONCTR_API_KEY & any application profile set
profile -P default Application 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.

Readme

Keywords

none

Package Sidebar

Install

npm i conctr

Weekly Downloads

3

Version

1.0.4

License

ISC

Last publish

Collaborators

  • sumeetrajpal