My first project ... beginner question

Hi guys , here I am learning elk.

I managed to:
1 Create an index.

PUT /dhcp_leases
{
  "settings": {
    "number_of_shards": 1
  },
  "mappings": {
    "properties": {
      "router": { "type": "text" },
      "current_leases": { "type": "integer" },
      "new_leases": { "type": "integer" }
    }
  }
}

2 Index some documents using api from external server.

POST /dhcp_leases/_doc/
{
  "router": "lujan",
  "current_leases": "2323",
  "new_leases": "2437"
}

I can view indexed docs doing:

GET dhcp_leases/_doc/ioOTnHQBgD6znyfFeQq9

GET dhcp_leases/_search
{
    "query": {
        "match_all": {}
    }
}

I have following questions:
How can I set an autoincremental integer id (similar to sql) ?
Why can not see anything at discovery section on kibana? should I add a date field ?
I think the idea here is to filter by index ... this is what Ive tryed.


I would like to create a graph with those values on kibana ... im in the right way ?
Regards.
Leandro.

We aren't all guys :slight_smile:

You would need to add that to the document yourself.

If you look at the left of the screen, you can see that your index pattern is filebeat-*, you will need to add a new pattern that points to your dhcp_leases index.
It would probably also be worth adding a timestamp to the data.

Hi @leostereo

One solution quite old (and I use because I am old :older_man: ) is using the _version.

All the details and are in this blog:

http://blogs.perl.org/users/clinton_gormley/2011/10/elasticsearchsequence---a-blazing-fast-ticket-server.html

That really only applies if you are updating the existing documents.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.