# Indexes based on different names

**URL:** <https://discuss.elastic.co/t/indexes-based-on-different-names/12475>\
**Category:** Elasticsearch\
**Created:** [June 19, 2013, 7:59am UTC](https://discuss.elastic.co/t/indexes-based-on-different-names/12475 "2013-06-19T07:59:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahesh\_V](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@Mahesh\_V](https://discuss.elastic.co/u/Mahesh_V)\
**Post date:** [June 19, 2013, 7:59am UTC](https://discuss.elastic.co/t/indexes-based-on-different-names/12475/1 "2013-06-19T07:59:27Z")

</div>

Hi,

I use the combination of rsyslog and elasticsearch which seems to be pretty  
common.

My requirement is something in the lines of this:

1. I will have as many as 16 processes running parallely and each process  
has 23 threads sending syslog information. (using syslog( ) system call)  
The message itself will look something like this "ip=x.x.x.x,  
name=abcd, loglevel=3, this is a test log"
2. My current architecture for logs is file based where I separate each  
process log to a different file.
3. I tried to log the above message with standalone mysql /sqlite (use SQL  
insert statements) where I had a single database and multiple tables for  
each process, however the performance was poor. ( I had high cpu usage on a  
4 core x86\_64 server having 32gb memory)
4. I start all processes one by one they run for a few hours and stop them  
all at once and collect/examine the logs.
5. I wont need to store the logs permanently, so I can go ahead and delete  
them once the analysis is over.

Is it possible in rsyslog to

1. create 1 index and multiple types for each of the process through  
rsyslog (or outside of it first using curl) based on some name that  
identifies the process
2. Query indexes separately for values (e.g. 1 process may have logs from  
ip addresses 1.1.1.1 to 1.1.1.10 and other process may have logs from  
1.1.1.11 to 1.1.1.20 etc)

So my index should look something like this curl -XGET  
localhost:9200/index//\_search?q=ip:"x.x.x.x"

"process1"  
"ip" : "x.x.x.x"  
"name": "abcd"  
"log": "test log"

"process2"  
"ip" : "y.y.y.y"  
"name": "wxyz"  
"log": "test log"

thanks a lot in advance  
regards  
Mahesh

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:30am UTC](https://discuss.elastic.co/t/indexes-based-on-different-names/12475/2 "2017-07-06T02:30:26Z")

</div>

Closed on July 6, 2017, 2:30am UTC


