AIOps

 View Only
  • 1.  Purge old/deleted resources in File Observer

    Posted Mon November 29, 2021 02:16 PM
    I am working with a ASM File Observer to load topology from ScienceLogic. I had an initial load and then I noticed the mergeTokens was too generic, for instance, 'db2inst1'. So, I tried to delete the wrong resources, fix the input file and load again. To delete, I loaded an empty file. I can see in Topology Viewer the resources are deleted. However, when I am trying to load a new/fixed file, it seems to keep the old/wrong merge token, from the deleted resources. As a result, it is messing up the topology.

    Question: How can I 'purge' the old deleted resources from ASM (File Observer)? Note: I can see the the delete resources in the Search results page if I toggle on the option "Include delete resources".

    Any help is appreciated. Thanks in advance, Fernando.

    ------------------------------
    Fernando Cavalcanti
    ------------------------------


  • 2.  RE: Purge old/deleted resources in File Observer

    IBM TechXchange Speaker
    Posted Wed December 08, 2021 11:50 AM

    An empty file will not delete the items ; you need to issue a Delete statement for each resource you put in  eg

    D:c85d9b32-abf7-4bc6-a534-90336cef187f
    D:7647a1eb-4540-4e97-8243-bf8f2fded712

    Thanks to John Postoyko for this answer.



    ------------------------------
    Angus Jamieson
    IT Service Management Solutions Architect
    IBM
    Edinburgh
    ------------------------------



  • 3.  RE: Purge old/deleted resources in File Observer

    Posted Thu December 09, 2021 08:30 AM
    Hi Angus, I ended up running a clean up script and reloading the topology. Then it worked.

    See below the script I ran to cleanup ASM. NOTE: 'noi-hybrid' is the name of my NOI release, so it needs to be updated accordingly while running it.

    $ cat cleanupASM.sh
    #!/bin/bash
    set -e
    oc scale deployment -l release=noi-hybrid-topology --replicas=0
    oc exec noi-hybrid-topology-elasticsearch-0 -- bash -c 'curl -X DELETE http://localhost:9200/searchservice*'
    oc exec noi-hybrid-cassandra-0 -- bash -c 'cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS -e "DROP KEYSPACE janusgraph"'
    oc scale deployment -l release=noi-hybrid-topology --replicas=1
    echo "All topology data should have been removed."
    echo "Done!"


    ------------------------------
    Fernando Cavalcanti
    ------------------------------



  • 4.  RE: Purge old/deleted resources in File Observer

    Posted Mon April 11, 2022 09:08 AM
    I have the same issue with version 1.1.9

    I noticed the same thing you did.. The history is hanging on to the bad merge tokens.  In my case it is merging thousands of things together by accident.


    I do not wish to remove the entire topology.  Only want 1 particular observer/provider to be cleaned up.

    I will be trying to let the deleted rows age out by changing my history TTL to 13 hours.. (1 more than the minimum setting).. Let the system sit after sending an empty file.. And seeing if the history is gone.  

    If that does not work, I will be trying explicit deletes.   (making that list will be a challenge so I am looking at an easier way than this).


    I will let you know how it goes.

    Steven Harmony


    ------------------------------
    Steven Harmony
    Associate/Analyst
    US Cellular
    Schaumburg IL
    (847) 293-8344
    ------------------------------



  • 5.  RE: Purge old/deleted resources in File Observer

    Posted Tue April 12, 2022 03:35 AM
    Hi Steven : are the items to be deleted contained in a file observer file ?

    ------------------------------
    john postoyko
    IBM
    London
    ------------------------------