As far as I'm aware it's not possible as a configuration option per-user, but that doesn't mean you can't do it. 🙂
Need to think this through a little more, but you should be able to do something along these lines:
dashboard
.user_prefs.conf
.application.js
for that app:$(document).ready(function() {
Splunk.Session.instance.UI_INACTIVITY_TIMEOUT = 0;
Splunk.Session.instance.timeoutDelay = 0;
function overrideStartTimeout() {
return;
}
Splunk.Session.instance.startTimeout = overrideStartTimeout;
Splunk.Session.instance.stopTimeout();
});
If you really want to do it within another app like search, you can do the same thing, but wrap it in an if
statement that checks the username. Getting the username may be non-trivial - usually it shows an auth token but not a name. If you have an AccountBar module, you can get it from there; if not, it may be hiding somewhere in the DOM, but I haven't seen it.
I still think, however, that compartmentalizing into a dedicated app is less risky.
lastKnownUser = 'unknown'
function getUserName() {
// Only works for pages that have an AccountBar module
text = jQuery('.accountBarItems').text()
r = /Logged in as (\S+)/
matches = r.exec(text)
if (matches) {
lastKnownUser = matches[1];
}
return lastKnownUser;
}
$(document).ready(function() {
if ( getUserName() == "dashboard" ) {
Splunk.Session.instance.UI_INACTIVITY_TIMEOUT = 0;
Splunk.Session.instance.timeoutDelay = 0;
function overrideStartTimeout() {
return;
}
Splunk.Session.instance.startTimeout = overrideStartTimeout;
Splunk.Session.instance.stopTimeout();
}
});
As far as I'm aware it's not possible as a configuration option per-user, but that doesn't mean you can't do it. 🙂
Need to think this through a little more, but you should be able to do something along these lines:
dashboard
.user_prefs.conf
.application.js
for that app:$(document).ready(function() {
Splunk.Session.instance.UI_INACTIVITY_TIMEOUT = 0;
Splunk.Session.instance.timeoutDelay = 0;
function overrideStartTimeout() {
return;
}
Splunk.Session.instance.startTimeout = overrideStartTimeout;
Splunk.Session.instance.stopTimeout();
});
If you really want to do it within another app like search, you can do the same thing, but wrap it in an if
statement that checks the username. Getting the username may be non-trivial - usually it shows an auth token but not a name. If you have an AccountBar module, you can get it from there; if not, it may be hiding somewhere in the DOM, but I haven't seen it.
I still think, however, that compartmentalizing into a dedicated app is less risky.
lastKnownUser = 'unknown'
function getUserName() {
// Only works for pages that have an AccountBar module
text = jQuery('.accountBarItems').text()
r = /Logged in as (\S+)/
matches = r.exec(text)
if (matches) {
lastKnownUser = matches[1];
}
return lastKnownUser;
}
$(document).ready(function() {
if ( getUserName() == "dashboard" ) {
Splunk.Session.instance.UI_INACTIVITY_TIMEOUT = 0;
Splunk.Session.instance.timeoutDelay = 0;
function overrideStartTimeout() {
return;
}
Splunk.Session.instance.startTimeout = overrideStartTimeout;
Splunk.Session.instance.stopTimeout();
}
});
Judging from http://www.splunk.com/base/Documentation/4.1.5/Admin/Configureusertimeouts,
In addition to setting the splunkweb/splunkd session value, you can also specify the timeout for the user browser session by editing the ui_inactivity_timeout value in web.conf. The Splunk browser session will time out once this value is reached. The default is 60 minutes. If ui_inactivity_timeout is set to less than 1, there's no timeout -- the session will stay alive while the browser is open.
But I'm not sure that can be applied to specific users or not..