Monitoring Splunk

Garbage collector graph for heap usage

kmahamkali
New Member

I am trying to create a dashboard for Heap analysis. There I would like to plot a line graph with a time taken for Full gc. So I extracted 3 feilds 1.Afg: memory after full Gc 2. Memory Before Full Gc 3. Tfg: time taken for full Gc. My data looks like this

_time Bfg (in bytes) Afg((iin bytes) Tfg in Sec
2018-06-05T01:41:59.882-0700 3827336 2714566 13.974176
2018-06-05T14:12:27.501-0700 3464646 2852415 14.039128
2018-05-25T01:32:57.757-0700 3802706 2080387 10.89727
2018-05-15T10:20:43.301-0700 3400723 1793472 9.449684
2018-05-17T02:36:08.789-0700 2946767 1731755 9.05516

I wanted to plot line graph for BFG and AFG and show the Tfg values on the Afg line at the corresponding values.
Please find the attached line graph for reference.
alt text
Can some one help me with the SPL?

0 Karma

Sukisen1981
Champion

Hi,

You will need to tweak things a little for the scale issue on the y axis. Divide your bytes by 10 ^6 to convert them to GB first, if that is acceptable try something like this |
eval bfg_gb= round(Bfg (in bytes)/1000000,1) |eval afg_gb= round(afg (in bytes)/1000000,1)|eval tfg=round(tfg,1)| chart values(bfg_gb),values(afg_gb),values(tfg) by _time

Check the output, is this similar to what you need?

0 Karma

kmahamkali
New Member

Awesome that works

0 Karma

Sukisen1981
Champion

hi @kmahamkali , if the answer is satisfactory, please accept the answer

0 Karma

kmahamkali
New Member

Any recommendations?

0 Karma
Get Updates on the Splunk Community!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability As businesses scale ...