Security

Reference to web.conf in login.html

pradeepkumarg
Influencer

Below is my web.conf

 
[settings]
serverName = lower_environment_3

I want to display the above serverName detail in login page. Tried this way and it doesn't work

hostName = cherrypy.request.app.config['global'].get('serverName', 'host_notset')

Any other way I could achieve this?

Tags (2)
1 Solution

sideview
SplunkTrust
SplunkTrust

No problem. What you're looking for is just

cherrypy.config.get('serverName')

It's a long story but the "app" in cherrypy.request.app.config has no relation to Splunk's "apps", nor is any splunk conf accessible that way.

So just put

${cherrypy.config.get('serverName')}

somewhere in your login.html and it'll display as "lower_environment_3"

View solution in original post

sideview
SplunkTrust
SplunkTrust

No problem. What you're looking for is just

cherrypy.config.get('serverName')

It's a long story but the "app" in cherrypy.request.app.config has no relation to Splunk's "apps", nor is any splunk conf accessible that way.

So just put

${cherrypy.config.get('serverName')}

somewhere in your login.html and it'll display as "lower_environment_3"

pradeepkumarg
Influencer

Perfect. Thanks so much!

0 Karma

santiagoaloi
Path Finder

it doesn't work for me, could you explain how you managed to get it to work?

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...