Loading...

Blog

A Journey of a Thousand Miles Begins with a Single Step

Delete all messages of a chat room

Find ObjectId of the chat room

> db.rooms.find({slug:"elk"}).pretty()
{
        "_id" : ObjectId("59a666cfa9886c002c30b404"),
        "owner" : ObjectId("59a547c2aed276003facf84f"),
        "name" : "Elasticschrott",
        "slug" : "elk",
        "description" : "Everything about the Elasticsearch Universe, including Logstash, Beats",
        "private" : false,
        "lastActive" : ISODate("2017-08-31T08:46:33.690Z"),
        "created" : ISODate("2017-08-30T07:18:39.885Z"),
        "messages" : [ ],
        "participants" : [ ],
        "archived" : true,
        "__v" : 0
}

Read more

Unarchive letschat chat room

A chat room in letschat was archived. To revive it we can alter the document in the MongoDB instance.

Read more

Search and Replace with VIM

I got this situation in a log file, where the JSON information is after the grep output of the file name.

Read more

Setup AWS Elasticsearch Service

Running Elasticsearch Service on AWS (Amazon Web Services)

Read more

Timestamps in Painless

In short: Converting a UTC timestamp to a local timestamp (in Switzerland).

Read more

Aggregate data in Elastisearch

Elasticsearch with its Query DSL allows powerful aggregations in order to save documents and disk space. After a certain period of time a certain level of detail is not needed anymore. For instance, I collect on a daily basis statistical data about fraud prevention services.

Read more

Analyze Cluster Reroute

My test cluster health was yellow. The X-Pack Monitoring pointed to some indices, which were yellow.

Read more

Reset Persistent Elasticsearch Cluster Setting

If you setup Elasticsearch to report to a dedicated monitoring cluster

PUT _cluster/settings
{
  "persistent": {
    "xpack.monitoring.exporters.cloud_monitoring.type": "http",
    "xpack.monitoring.exporters.cloud_monitoring.host": "MONITORING_ELASTICSEARCH_URL",
    "xpack.monitoring.exporters.cloud_monitoring.auth.username": "cloud_monitoring_agent",
    "xpack.monitoring.exporters.cloud_monitoring.auth.password": "MONITORING_AGENT_PASSWORD"
  }
}

Read more

Ship Monit logs with Filebeat

A quick recipe how to ship Monit logs to Elasticsearch. Some initial configuration was in place but I ran into some troubles.

Read more