Getting Data In

Can I issue a "_bump" from the command line?

Lowell
Super Champion

I'd like to script a _bump call after replacing the favicon.ico. (This is something I do after each splunk install or upgrade.) Is there an quick way to do this?

Preferably, is there are way to do this without requiring splunkweb to be running?

1 Solution

melting
Splunk Employee
Splunk Employee

This value is read directly from a text file. If you read the file, increment the value, write it back, then start/restart splunkweb you will get the desired effect.

You may not need to do this as the install/upgrade should already be breaking the users cache as each version is included in the cache breaking mechanism.

View solution in original post

0 Karma

Lowell
Super Champion

For anyone following along at home. Here's a shell script I wrote to do increment the version number from the command line.

Here's the contents of do_bump.sh:

#!/bin/bash
# Default splunk home if not already set
SPLUNK_HOME=${SPLUNK_HOME-/opt/splunk}

bump=`cat $SPLUNK_HOME/var/run/splunk/push-version.txt`
echo "Current version: $bump"
let bump++
echo -n $bump > $SPLUNK_HOME/var/run/splunk/push-version.txt
echo "New version:  $bump    (Restart splunkweb?)"

David
Splunk Employee
Splunk Employee

Since I ended up here, x-posting -- if anyone wants to do this with Javascript, it's far easier and doesn't require a splunkweb restart:
https://answers.splunk.com/answers/390115/how-do-you-programmatically-bump-a-search-head.html#answer...

0 Karma

melting
Splunk Employee
Splunk Employee

This value is read directly from a text file. If you read the file, increment the value, write it back, then start/restart splunkweb you will get the desired effect.

You may not need to do this as the install/upgrade should already be breaking the users cache as each version is included in the cache breaking mechanism.

0 Karma

Lowell
Super Champion

It looks like push-version.txt is the file you are talking about. I've added an answer with a simple script to do increment this value. Thanks for leading me in the right direction. (BTW, I think I often forget to replace the "favicon.ico" until after I've started splunk after an upgrade, so I'll add this logic to my "post-install" script and that should make sure the right icon gets seen by the users.)

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...