Blog about things

blogging experiment about hacking

Query Our Log Records in Logsene

Another way to query our log data is via the exposed ElasticSearch REST API. For more info see Search through Elasticsearch API and ElasticSearch API

From the referenced document:
When you use the API, here are the things you need to know:

  • host name: logsene-receiver.sematext.com
  • port: 80 (443 for HTTPS)
  • index name: your Logsene application token - note that this token should be kept secret

Searching

Let’s assume you want to search through your syslog events from the “user” facility. You could do something like this:

1
2
curl https://logsene-receiver.sematext.com/LOGSENE-APP-TOKEN/syslog/_search?q=facility:user