FAQ¶
How do I easily post data to Observe?¶
The easiest method is to use a supported existing collector, such as 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 displays as the path
attribute of your collected observations:
$ curl -s \
https://{OBSERVE_CUSTOMER}.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
Observe recommends using data streams and data stream tokens instead of the older style ingest tokens.
If you use 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 Observe Support and they can generate a token for you.
How do I create an access token that can do more than just ingest data?¶
If you use 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.