Duplicate documents are reflecting for snmp data in ES - 536

Duplicate documents are reflecting for snmp data in ES - 536





          


  Solution Document

 Duplicate documents in Elasticsearch

  Overview

General/Customer specific

General

Author

Rukmini

Reviewer

Aman,Siva

Approver

 

Release date

03/08/2022

Product Version

9.1r3


Audience: CSG/TechWarriors/PAC/Platform/Product teams



What’s the Issue? 

In BMCSL setup we saw duplicate documents are indexing at the same time in network-health and network-element-health index.

Describe the Issue in Detail

We observed wrong input/output bandwidth utilization, while analyzing issue, we saw duplicates documents are indexing at the same time in network-health and network-element-health index it will impact on disk space and calculation of bandwidth utilization (because we are using arithmetic plugin in bandwidth calculation, Arithmetic plugin gives period as the output between two documents, if two documents indexed at same time obviously, we will get wrong bandwidth).


After analyzing input(snmp-data) and output topics (network-element-health, network-health) of snmp-app we saw one input message and 2 corresponding output messages with only difference of one field (@correlate_metadata). 

We discussed with Rahul (bigdata team) and he suggested to use the snmp-app with old image. When we checked with old image, we didn’t see any issue.

We need to test the correlate plugin in latest image (product team)

to avoid issue temporarily we ran snmp-app using old vunetstream image.

  1. docker image ls

  1. We should make copy file create-stream-v1.sh as create-stream-v1-test.sh
  2. And change image with old image in the file create-stream-v1-test.sh at line number 131 we can see image path .( ghcr.io/vunetsystems/vustreams:latest) replace latest image path with old image(ghcr.io/vunetsystems/vunetstreams) and save file.

  1. Stop snmp-app using docker service rm snmp-app
  2. Run snmp-app with new image (./create-stream-v1-test.sh /deployment/config_snmp_app.conf)

Once we ran snmp-app using old vunetstream image duplicates document issue resolved but we should fix this on latest image as well because some other latest required configuration may not available on old one.



Solution Summary

  1. After fixing the issue in latest image we need to load the latest image into environment, issue was a missing filter in the program which led to the data duplication.

Solution Steps in Detail

  1. To load the latest image into environment should follow the below steps.
  2. Copy latest vustream .tar image file into server using winscp.(/data/vuDocker)
  3. cd /data/vuDocker/
  4. ll
  5. docker image ls
  6. docker load -i vusteams-latest.tar.gz (to load image in main server)
  7. To load image into all the servers
  8. mv vusteams-latest.tar.gz vustream02Aug.tar
  9. mv vustream02Aug.tar /data/vuDocker/docker-script/docker-images/
  10. cd /data/vuDocker/
  11. ls -ltr
  12. vim test.sh
  13. scp /data/vuDocker/docker-script/docker-images/vustream02Aug.tar vunet@$ip:/data/vuDocker/docker-script/docker-images
  14. ssh vunet@$ip "docker load -i /data/vuDocker/docker-script/docker-images/vustream02Aug.tar"
  15. TextDescription automatically generated with medium confidence
  16. Save the file
  17. ls -ltrh /data/vuDocker/docker-script/docker-images/vustream02Aug.tar
  18. bash test.sh
  19. cd ../vusmartmaps/bin/kafka-streams/
  20. docker service ls
  21. docker service rm snmp-app (we are stopped running snmp-app ,because due to duplicate documents issue snmp-app started using older image, in other situation we need restart all applications ).
  22. ./create-stream-v1.sh deployment-configs/config_snmp_app.sh
  23. docker service ls
  24. docker service logs -f snmp-app


  1. by refering below image we can understand issue got resolved there is no duplicate documents at time (image 2) and also there is no interval in input topic(image 1) and same as es indexing(image2) , latest image working properly


                


A picture containing graphical user interfaceDescription automatically generated




Corrective actions if any to avoid in future

  1. No


More Help

References



    • Related Articles

    • configured SNMP data source but not getting data. What could be wrong?

      Ques- configured SNMP data source but not getting data. What could be wrong? ANS- Check if SNMP agent is enabled on the router with manager configured to the vuSmartMaps SNMP Manager IP and configured UDP port (default 161). You can try to do a basic ...
    • unable to read data from ES having nested fields 505

       Solution Document ICICI || unable to read data from ES having nested fields   Overview General/Customer specific General Author Tejaswi Botla Reviewer NA Approver  NA  Release date 18/08/2022 Product Version 8.5r5 Audience: ...
    • ES Has Become Readonly

      Ques - ES has become readonly and unable to index any data. How to resolve this? Ans - https://kb.objectrocket.com/elasticsearch/how-to-fix-the-forbidden-12-read-only-api-error-in-elasticsearch-282   ...
    • How do I stop ES replication in my setup?

      Question: ES is be default to replicate data being received for high availability. Though this makes sure that we have all the data available even if one of the analyser node goes down but it also slows down the overall indexing. In some places, we ...
    • [RBL] Issue With Data Indexing

      There is following issue with the RBL project.  We are monitoring ESB as an application in RBL. Currently, I am not able to see proper data getting indexed. Redis queue building up and dequeuing is also happening properly. There is no error in ES as ...