All Apps and Add-ons

Dynamically edit node border color?

hoangtony
Explorer

Hi Everyone,

Is there a method to dynamically set the border color of nodes? I can do it for the node fill color using the color field when generating search results however there isn't an option for border.

Looking at the SimpleXML I can see it has an option flow_map_viz.flow_map_viz.node_broder_color which sets it for all and is fixed.

I'm trying to make use of the border color to indicate an issue with the host node whereas the fill is the service running on it and being able to dynamically do this would be great.

Thanks!

0 Karma
1 Solution

chrisyounger
SplunkTrust
SplunkTrust

Yeah unfortunatly there isn't a way to do this at the moment sorry. You could try put one node over the top of another and just change the size?

Actually probably a better way would be to enable "HTML in labels" in advanced settings, and then you can pass a small block of HTML formatted text, something like eval label = "<div style=\"border: 2px solid " + my_color_variable + "\">" + some node contents + "</div>"

This basically gives you infinite customizability but it is a bit ugly.

View solution in original post

dm1
Builder

Hi @hoangtony 

Can you please share how you are dynamically able to set the border using node fill color using the color field when generating search results ?

If possible, it would be great if you could also share the SPL as well. thanks.

0 Karma

chrisyounger
SplunkTrust
SplunkTrust

Yeah unfortunatly there isn't a way to do this at the moment sorry. You could try put one node over the top of another and just change the size?

Actually probably a better way would be to enable "HTML in labels" in advanced settings, and then you can pass a small block of HTML formatted text, something like eval label = "<div style=\"border: 2px solid " + my_color_variable + "\">" + some node contents + "</div>"

This basically gives you infinite customizability but it is a bit ugly.

hoangtony
Explorer

Hi Chris,

Thanks for getting back so quickly. I tried this approach and I'm seeing a border around the label/text itself (the screen capture above) and not the node border (the screen capture below).

Btw love the add-on!

alt text

alt text

Edit: Actually I figured that it's a DIV so I can change the width and height to match. I'll have a play with this, thanks.

0 Karma

chrisyounger
SplunkTrust
SplunkTrust

Yeah by injecting your own HTML with CSS you can do anything you want

0 Karma

hoangtony
Explorer

Thanks Chris, works a treat. I've just stuck the labels into a macro to clean up the search a little.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

The Data Connection - November 2026

Machine data keeps growing, and every new source brings practical questions: where should it live, how ...

Splunk Auto Ingestion Parallel Pipeline Scaling

Why this feature matters Many Splunk environments experience ingestion pressure long before the host is fully ...

Splunk SecOps on AWS: A New Agentic SecOps Experience

Key takeaways At AWS:reinvent, Splunk, in partnership with Amazon Web Services (AWS), announced Splunk SecOps ...