FAQ

How do I easily post some data to Observe?

Easiest is to use some supported existing collector, like those for fluentd, filebeat, or prometheus. To send JSON to Observe directly, POST an array of JSON payloads to the https endpoint. The path after the endpoint bit will show up as the path attribute of your collected observations:

$ curl -s \
	https://collect.observeinc.com/v1/http/your-path-here \
	-H 'Authorization: Bearer ${OBSERVE_CUSTOMER} ${OBSERVE_TOKEN}' \
	-H 'Content-type: application/json' -d '[{"foo":"bar"}]'

Note that the Authorization header needs the token Bearer followed by both your customer ID, and a token, separated by a space.

How do I create a token to post data to Observe?

Note

We recommend using data streams and data stream tokens instead of the older style ingest tokens. For more, see the Data streams documentation.

If you are using a username and password to access Observe, you can do this with a curl command like the following:

$ curl -s \
	https://${OBSERVE_CUSTOMER}.observeinc.com/v1/login/ingestToken -d \
	'{"user_email":"[email protected]", "user_password":"so secret"}'

Where OBSERVE_CUSTOMER is your numeric Customer ID (in this example, from an environment variable.) The response looks like this:

{
  "ok":true,
  "access_key":"Ga21uay2vAGrzxfZHgJN4gNhuCBC9oKD",
  "expiration":"2021-04-03 20:08:39",
  "tokenName":"[email protected]"
}

If you use SSO authentication, or if you would like assistance, contact your Observe account manager and they will be happy to generate a token for you.

How do I create an access token that can do more than just ingest data?

If you are using a username and password to access Observe, use curl to generate an access token:

$ curl -s \
	https://${OBSERVE_CUSTOMER}.observeinc.com/v1/login -d \
	'{"user_email":"[email protected]", "user_password":"so secret", \
	"tokenName":"My token name"}'
{
  "ok":true,
  "access_key":"Ga21uay2vAGrzxfZHgJN4gNhuCBC9oKD",
  "expiration":"2021-04-03 20:08:39",
  "tokenName":"My token name"
}

Note that the curl URL in this case is /v1/login not /v1/login/ingestToken

Also, it’s possible to provide a specific name to keep track of this token.