Splunk Dev

How to show the avg and their status in Flow Map viz connections

Anud
Path Finder

How to show the avg and their status in Flow Map viz connections.

index=gc source="log" QUE_NAM="S*"
| stats sum(eval(FINAL="MQ SUCCESS")) as good
sum(eval(FINAL="CONN FAILED")) as errors
sum(eval(FINAL="MEND FAIL")) as warn avg(QUE_DEP) as queueAvgDept by QUE_NAM
| eval to=QUE_NAM, from="internal"
| append
[search index=es sourcetype=queue_monitor queue_name IN ("*Q","*R")
| bucket _time span=10m
| stats max(current_depth) as max_Depth avg(current_depth) as avg_Depth by _time queue_name queue_manager
| eval to=queue_name, from="external"]


For this query, i got below visualization and i need to connect between internal and external one ( highlighted in red color and how to show the avg count through the flow in between  external and name)

Please help me out on this

Thanks in advance!


Anud_0-1718991845571.png

 

Labels (1)
0 Karma

tscroggins
Champion

Hi @Anud,

We can optimize your search if you provide mock samples of your data, but here's an example using makeresults and your current search structure to simulate the fields required by the visualization:

| makeresults format=csv data="QUE_NAM,FINAL,QUE_DEP
S_FOO,MQ SUCCESS,
S_FOO,CONN FAILED,
S_FOO,MEND FAIL,
S_FOO,,3" 
| stats sum(eval(if(FINAL=="MQ SUCCESS", 1, 0))) as good sum(eval(if(FINAL=="CONN FAILED", 1, 0))) as error sum(eval(if(FINAL=="MEND FAIL", 1, 0))) as warn avg(QUE_DEP) as label by QUE_NAM 
| rename QUE_NAM as to 
| eval from="internal", label="Avg: ".label." Good: ".good." Warn: ".warn." Error: ".error 
| append 
    [| makeresults format=csv data="queue_name,current_depth
    BAR_Q,1
    BAZ_R,2" 
    | bin _time span=10m 
    | stats avg(current_depth) as label by queue_name 
    | rename queue_name as to 
    | eval from="external", label="Avg: ".label 
    | appendpipe 
        [ stats values(to) as from 
        | mvexpand from 
        | eval to="internal" ]]

good, error, and warn are special fields supported by the visualization. Add the label field to provide a custom link label, and leave the special fields intact to produce the flowing dot animation.

tscroggins_0-1719010675015.png

Anud
Path Finder

Hi @tscroggins,
How we can represent server icon for the nodes.
could you please let me know.

Thanks in advance!

0 Karma

tscroggins
Champion

Hi @Anud,

The add-on documentation explains how to assign icons to nodes. What have you tried so far?

0 Karma

Anud
Path Finder

Thanks for the quick response!
Its working as expected. 

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to January Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...

[Puzzles] Solve, Learn, Repeat: Reprocessing XML into Fixed-Length Events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...