Dashboards & Visualizations

How can I backup and maintain a version of dashboard XML files before updating anything in production?

Builder

Hi Experts,

I know this is an out of the box question , but still if you can provide your valuable inputs or advice.
I am working on DEV and I want to update things in PROD in the dashboard XML files. I want to take a backup and maintain a version for all the XML files before updating anything to PROD.

One simple way is to take the backup and save it to some other location or on other machine .I was wondering if we have any other option like if we have any software or any tool from where we can maintain our versions and all.

Thanks
Vikas

Tags (3)
1 Solution

Motivator

Fire up your favorite search engine and search for "source control." There are about fifty ways to do what you are asking for. Choose the one that makes the most sense for your environment.

View solution in original post

Path Finder

Related to the question and I think a proper answer. I have played around with and think this is a very good tool. It can be run as a one shot as well as being run to keep real version control without having to edit in GIT.

It is called "Versioncontrol for Splunk" and can be found on Splunkbase. https://splunkbase.splunk.com/app/4355/

It is possible to write an exporter that uses the REST API to do an export of any of the Splunk knowledge objects. I have done this myself and something like that would be the simplest.

Here is curl example that will export a the dashboard from a given app. The output can be used to inport the dashboard back if needed and would be similar to what "versioncontrol for Spunk" does.

curl -k -u username:password https://localhost:8089/servicesNS/admin/search/data/ui/views/my_dashboard

There is another API call to get a list of all the dashboards in an app. Also if you omit the dashboard name in the API you will get all the dashboards in one output file.

A good toll to play with these endpoints is "insomnia", it is free and is feature rich.

Also here is a link to the docs. https://docs.splunk.com/Documentation/Splunk/8.0.3/RESTUM/RESTusing
The REST API can do just about anything in splunk and this is how splunk itself does most things.

I hope this helps people get going with exporting knowledge objects from splunk.

SplunkTrust
SplunkTrust

Other alternatives include:
https://github.com/paychex/Splunk.Conf19 PayChex cover your assets (conf presentation/example queries)
https://splunkbase.splunk.com/app/4182/ Git Version Control for Splunk

You may also wish to vote for https://ideas.splunk.com/ideas/E-I-7 on the ideas.splunk.com website but make sure you understand how it works first, you will find the Ideas documentation here

0 Karma

Motivator

Fire up your favorite search engine and search for "source control." There are about fifty ways to do what you are asking for. Choose the one that makes the most sense for your environment.

View solution in original post

Path Finder

I downvoted this post because this is not helpful or insightful.

0 Karma

Explorer

I downvoted this post because not really a helpful answer more degrading than anything. person could have recommended a good tool rather than being a tool.

Community Manager
Community Manager

@mgast your only activity on Answers has been downvoting other users which is not constructive to helping out the greater community. Unlike other community forums, downvoting here should be reserved for posts that could potentially be harmful or against best practices. Simply commenting on how an answer could be improved would suffice. Calling someone a tool is uncalled for. Refrain from this type of behavior in the future.

0 Karma

Explorer

How does telling someone to google search something provide benefit? So I should just post 100 times about searching google for the answer and that is acceptable? Downvoting an answer because it provides no useful information so that others do not waste their time should be acceptable. Otherwise this is just a post for people trying to get karma on the site.

0 Karma

I searched for "Splunk Dashboard versioning" and this post was the first one that came up.

I agree with @mgast, this answer is self-serving, condescending, and does not give me any further information that will help me further reach my goal of investigating versioning of dashboards within Splunk.

0 Karma

Path Finder

All this back and forth and we still don't have a tool/app

0 Karma

Ultra Champion

Apache Subversion, Git, SCCS, Microsoft Visual SourceSafe, BitKeeper, PVCS, etc...

0 Karma

SplunkTrust
SplunkTrust

@mgast - The answer was helpful because it provided the search term the poster clearly did not know, and because the poster accepted the answer, with thanks. Those are just facts.

Myself, I generally would have given two or three examples that I had seen used that worked well. If I had that knowledge, I would go ahead and post it as either an additional answer or a comment on this one.

We just don't go negative around here, because it's not necessary or helpful. Very few people are intent on gaming the system, and any that do will pretty quickly figure out that down-voting others isn't an effective method anyway, when you are paying 2 points to remove 5, while everyone else is happily chatting away and ignoring you.

The general idea here is to only downvote answers and comments that are actively harmful or unworkable, or that promote TODAY a tech method that is deprecated already (and do not state so).

On a very old answer, you can just post a comment asking one of us to edit the answer to add a note at the top that the accepted solution is deprecated.

Motivator

Hi, @mgast.

First things first: I don't necessarily have a problem with the downvote. In any environment where upvotes and downvotes exist, and anyone is allowed to make them, we are all free to express our opinion, unless we're violating the norms of the community. (That's for @ppablo_splunk to decide.)

I'll explain why I answered the way I did: The question has nothing to do with Splunk, and getting into non-Splunk discussions in Splunk forums is generally frowned upon. But I still wanted to be helpful, without going into a deep dive on the subject. It was clear to me from the question that the questioner did not understand the concept of source control (or they wouldn't have asked it), so I pointed them in the direction of that concept. As you can see, the questioner thanked me for my response and it was accepted as the answer, so it seemed to be a successful response.

(I never recommend particular source control systems - everyone has their favorite, and different environments lend themselves to different ones. The questioner should evaluate the information they find against their own environment and needs and decide for themselves.)

Finally, this exchange is about three years old, and not Splunk-related. Why vote on it now?

Anyways, your time is your own, and if you felt strongly that you had to spend it registering a negative opinion of my three-year-old answer, that's fine with me. But I would consider taking @ppablo_splunk's advice, and instead spend that time giving answers to new questions and improving existing ones.

Builder

Thanks Aweitzman

0 Karma