# Simultaneous data use of 2 indices differentes | Utilisation simultanée de 2 indices differents

**URL:** <https://discuss.elastic.co/t/simultaneous-data-use-of-2-indices-differentes-utilisation-simultanee-de-2-indices-differents/281688>\
**Category:** Elasticsearch\
**Created:** [August 17, 2021, 1:38pm UTC](https://discuss.elastic.co/t/simultaneous-data-use-of-2-indices-differentes-utilisation-simultanee-de-2-indices-differents/281688 "2021-08-17T13:38:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kalache](https://avatars.discourse-cdn.com/v4/letter/k/ccd318/32.png) [@kalache](https://discuss.elastic.co/u/kalache)\
**Post date:** [August 17, 2021, 1:38pm UTC](https://discuss.elastic.co/t/simultaneous-data-use-of-2-indices-differentes-utilisation-simultanee-de-2-indices-differents/281688/1 "2021-08-17T13:38:33Z")

</div>

Hello,  
I’m improving the IT inventory and I want to use the Elastic Stack to made it.  
Logstash collect data into CSV file, Elasticsearch analyze this data and Kibana let us to visualize the data.

Why we want to use Elastic Stack ? I want a dynamic inventory, automated. Also, we can made more with the stack.

Already in use, I’ve got 2 data entries, with the name, the IP Address, OS..  
Logstash collect data into 2 CSV files, and create 2 indices like « Inventory\_1-date » and « Inventory\_2-date ». I’ve create an Index also « Inventory\* ».

I create annother index with the Dev Tools « referentiel » is a mapping of the differents indices.  
I want to simultaneous use the data of both sources, with the IP Address like a reconciliation key. Is it possible ?

Actually, when i selection data of the source 1, source 2 display « No results found » with the « Inventory\* » index and « referentiel » index.

Bonjour,

Je cherche à optimiser l’inventaire. J’ai pensé à utiliser la suite ELK dans le fonctionnement suivant :

- Logstash : qui récupère les exports des fichiers CSV
- Elasticsearch : qui s’occupe de traiter ces données
- Kibana : qui va me permettre d’afficher ses données

Pourquoi utiliser la stack Elastic ? Pour avoir un inventaire dynamique, automatisé, se mettant à jour comme un grand. Et des nouvelles utilisations peuvent voir le jour grâce au fait que la stack est assez complète.

Pour l’instant j’ai 2 sources d’entrées, qui récupère des informations tel que le nom, l’adresse IP, l’OS etc.  
Logstash est actuellement utilisés pour récupérer et créer 2 indices journaliers pourtant comme nom « inventaire\_1-date » et « inventaire\_2-date ». Un index a été créer avec comme nom « inventaire\* ».  
Un autre index portant le nom de « référentiel » a été créé via le mapping des diffèrent indices.

J’aimerais pouvoir faire en sorte d’utiliser dans Kibana, les données des deux sources simultanément, avec l’adresse IP comme clé de réconciliation. Est-ce possible ?  
Actuellement, lorsque je sélectionne une donnée de la source 1, la source 2 m’affiche « no results found » avec les deux indexes.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 18, 2021, 10:02pm UTC](https://discuss.elastic.co/t/simultaneous-data-use-of-2-indices-differentes-utilisation-simultanee-de-2-indices-differents/281688/2 "2021-08-18T22:02:20Z")

</div>

Welcome to our community! 😃  
(@dadoonet might be able to help here with the French, in case I miss something.)

Are both of your index mappings are the same this _should_ work, but it might help if you can share your mappings so we can take a closer look.

---

<div class="post-metadata">

**Author:** ![kalache](https://avatars.discourse-cdn.com/v4/letter/k/ccd318/32.png) [@kalache](https://discuss.elastic.co/u/kalache)\
**Post date:** [August 20, 2021, 7:51am UTC](https://discuss.elastic.co/t/simultaneous-data-use-of-2-indices-differentes-utilisation-simultanee-de-2-indices-differents/281688/3 "2021-08-20T07:51:38Z")

</div>

Hello @warkolm  
Thanks for your reply.  
So it's all the same ! I create un a alias with

```auto
POST _aliases
{
  "actions": [
    {
      "remove": {
        "index": "*",
        "alias": "inventaire"
      }
    }
  ]
}

```

And after i creat the index "inventaire" with the alias. And i map all in inventaire with

```auto
PUT inventaire
{ 
"mappings": {
"properties" : {
        "@timestamp" : {
          "type" : "date"
        },
        "@version" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Application" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Backup_nbu" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Cluster" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Domaine" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Envirnoment" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Environement" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Evault_Agent" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Evault_Job" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Hypervisor" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "IPAddress" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Memory" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "NB_LAST_BACKUP" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Networks" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "NumCPU" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "OS" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "PMS" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "PMSInfo" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Powerstate" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Resp_app" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Site" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "StorageUsed" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "ToolsStatus" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "VMName" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "cbt_reset_lock" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "host" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "message" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "path" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "tags" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            },
			 "@version" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "BiosInfo" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "ClientVersion" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "ComputerRole" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "ComputerTargetGroupIds" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "FullDomainName" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "IPAddress" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Id" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "LastReportedInventoryTime" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "LastReportedStatusTime" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "LastSyncResult" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "LastSyncTime" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Make" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "Model" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "OSArchitecture" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "OSDescription" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "OSFamily" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "OSInfo" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "ParentServerId" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "RequestedTargetGroupName" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "RequestedTargetGroupNames" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "SyncsFromDownstreamServer" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "UpdateServer" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "host" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "message" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "path" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "tags" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        }
		}
		}
		}
		}
		}

```

It doesn't work...

---

<div class="post-metadata">

**Author:** ![kalache](https://avatars.discourse-cdn.com/v4/letter/k/ccd318/32.png) [@kalache](https://discuss.elastic.co/u/kalache)\
**Post date:** [August 20, 2021, 7:55am UTC](https://discuss.elastic.co/t/simultaneous-data-use-of-2-indices-differentes-utilisation-simultanee-de-2-indices-differents/281688/4 "2021-08-20T07:55:10Z")

</div>

But I've got a warning with all fields !

```auto
#! At least one multi-field, [tags], was encountered that itself contains a multi-field. Defining multi-fields within a multi-field is deprecated and will no longer be supported in 8.0. To resolve the issue, all instances of [fields] that occur within a [fields] block should be removed from the mappings, either by flattening the chained [fields] blocks into a single level, or switching to [copy_to] if appropriate.
#! Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.13/security-minimal-setup.html to enable security.
{
  "acknowledged" : true,
  "shards_acknowledged" : true,
  "index" : "inventaire"
}

```

We can see that it's work, but in my dashboard, when I took an information in the first data source, the second display "no results found"..

---

<div class="post-metadata">

**Author:** ![kalache](https://avatars.discourse-cdn.com/v4/letter/k/ccd318/32.png) [@kalache](https://discuss.elastic.co/u/kalache)\
**Post date:** [September 1, 2021, 8:32am UTC](https://discuss.elastic.co/t/simultaneous-data-use-of-2-indices-differentes-utilisation-simultanee-de-2-indices-differents/281688/5 "2021-09-01T08:32:57Z")

</div>

Hello everybody,  
So I try it with more simple data.

My first data source is named : data1, and the seconde one : data2.

We have Fields 1,2,3,4 and IPAddress for row, and the data is like A1, A2,A3,B1,B2... and IPAddress.  
I want to use the IP Address like a master key.  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/6/566e742adca1ed31f78e307e6ee5d442ea537b18.png)

In this case, I just want to have A1, B1, C1 and D1 in the same line of IP Address 192.168.1.1.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 1, 2021, 9:54pm UTC](https://discuss.elastic.co/t/simultaneous-data-use-of-2-indices-differentes-utilisation-simultanee-de-2-indices-differents/281688/6 "2021-09-01T21:54:33Z")

</div>

Oh ok, Kibana can't do that at the moment (that I am aware of).

---

<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:** [September 29, 2021, 9:54pm UTC](https://discuss.elastic.co/t/simultaneous-data-use-of-2-indices-differentes-utilisation-simultanee-de-2-indices-differents/281688/7 "2021-09-29T21:54:36Z")

</div>

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