DX Application Performance Management

Expand all | Collapse all

Remove historical metrics from specific agent

Jump to Best Answer
  • 1.  Remove historical metrics from specific agent

    Posted 05-10-2016 05:45 AM

    Hi,

     

    Is there a way to remove historical metrics from specific agents only.

    As i know, we can remove historical metrics from smarstor data for all agents. not sure if we can do the same for particular agent?

     

    Thanks.



  • 2.  Re: Remove historical metrics from specific agent
    Best Answer

    Posted 05-10-2016 06:03 AM

    Hi,

     

    I went through the process myself a while ago and here are the steps required. It uses smartstortools  in essence it describes how to remove a group of metrics for a particular agent from the smartstor. Also bear in mind that if the agent has it's metrics stored on multiple collectors then the process will need to be repeated on each collector

     

    +++++++++++++++++

    Stop the EM

     

    Created a folder for new smartstore datanew (you will need to create many new folders as you go through the process- you can delete these when you have finished)

     

    Listed existing agents

     

    $ ./SmartStorTools.sh test_regex -agents ".*|.*|.*" -src ../data

    SuperDomain|Custom Metric Host (Virtual)|Custom Metric Process

    (Virtual)|Custom Business Application Agent (Virtual) (coomi06-VM86669@5003)

    SuperDomain|coomi06-VM58917|WebSphere|coomi06-VM58917Node01Cell/server1

    SuperDomain|coomi06-VM86669|EPAgentProcess|EPAgent

    SuperDomain|coomi06-VM65907|.NET Process|wwwroot

    SuperDomain|coomi06-VM65907|.NET Process|apmmodel

    SuperDomain|coomi06-VM65907|.NET Process|PerfMonCollectorAgent.exe

    SuperDomain|coomi06-VM65907|Web Servers|Web Servers

    SuperDomain|Custom Metric Host (Virtual)|Custom Metric Process

    (Virtual)|Custom Metric Agent (Virtual) (coomi06-VM86669@5003)

     

    agent I wish to work on is

     

    SuperDomain|coomi06-VM86669|EPAgentProcess|EPAgent so verified the name

     

    $ ./SmartStorTools.sh test_regex -agents

    "SuperDomain\\|coomi06-VM86669\\|EPAgentProcess\\|EPAgent" -src ../data

    SuperDomain|coomi06-VM86669|EPAgentProcess|EPAgent

     

    created a new smartstor for just this agent

     

    S ./SmartStorTools.sh keep_agents -agents

    "SuperDomain\\|coomi06-VM86669\\|EPAgentProcess\\|EPAgent" -src ../data -dest ../datanew

    12/30/14 08:45:45 PM EST [INFO] [Manager] Copying

    ../data/1419944415000.data to ../datanew/1419944415000.data

    ......

    12/30/14 08:45:55 PM EST [INFO] [Manager] Pruning agent named SuperDomain|Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Metric Agent (Virtual) (coomi06-VM86669@5003)

    12/30/14 08:45:55 PM EST [INFO] [Manager] Pruning agent namedSuperDomain|Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Business Application Agent (Virtual) (coomi06-VM86669@5003)

    12/30/14 08:45:55 PM EST [INFO] [Manager] Pruning agent named SuperDomain|coomi06-VM65907|.NET Process|PerfMonCollectorAgent.exe

    12/30/14 08:45:55 PM EST [INFO] [Manager] Pruning agent named SuperDomain|coomi06-VM65907|.NET Process|apmmodel

    12/30/14 08:45:55 PM EST [INFO] [Manager] Pruning agent named SuperDomain|coomi06-VM65907|.NET Process|wwwroot

    12/30/14 08:45:55 PM EST [INFO] [Manager] Pruning agent named SuperDomain|coomi06-VM65907|Web Servers|Web Servers

    12/30/14 08:45:55 PM EST [INFO] [Manager] Pruning agent named SuperDomain|coomi06-VM58917|WebSphere|coomi06-VM58917Node01Cell/server1

     

    pruned new smartstore

     

    $ ./SmartStorTools.sh prune -src ../datanew -dest ../datanew1

     

    listed metrcis in new smartstore - only contains metrics for interesting agent

     

    $ ./SmartStorTools.sh test_regex -metrics ".*|.*|.*" -src ../datanew1 >metrics1.out

     

    You can now use remove_metrics to delete those metrcis that are not required - in my case all those starting DAVID

     

    $ ./SmartStorTools.sh remove_metrics -metrics "DAVID.*" -src ../datanew1 -dest ../datanew4

     

    use test_regex to check what you want is still present

     

    $ ./SmartStorTools.sh test_regex -metrics ".*|.*|.*" -src ../datanew4

     

    now you need to create a smarstore containing all metrcis excpet those for the problem agent

     

    $ ./SmartStorTools.sh remove_agents -agents

    "SuperDomain\\|coomi06-VM86669\\|EPAgentProcess\\|EPAgent" -src ../data -dest ../datanew2

    ......

    12/30/14 09:05:59 PM EST [INFO] [Manager] Pruning agent named SuperDomain|coomi06-VM86669|EPAgentProcess|EPAgent

     

    and then prune that

     

    $ ./SmartStorTools.sh prune -src ../datanew2 -dest ../datanew3

     

    then merge the two together

     

    $ ./SmartStorTools.sh merge ../datanew3 ../datanew4

     

    you can now copy datanew4 to be the data folder for the EM and restart it.

     

    thanks

    Mike



  • 3.  Re: Remove historical metrics from specific agent

    Posted 05-10-2016 06:09 AM

    Hi:

    Did Mike's procedure work for you. Is additional assistance required?

     

    Thanks

    Hal German