Deployment Architecture

set hostname

gcusello
SplunkTrust
SplunkTrust

Hi at all,
I have to create an Heartbeat Alert that contains three fields:

  • TimeStamp,
  • HostName
  • Message My problem is HostName because I have a Search Head Cluster with three SH, so I cannot use a fixed value and I don't know how to set in a search the value of the present SH that is executing the search. Is there a way to do this?

Thank You.
Bye.
Giuseppe

0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

You can use $server.serverName$ in the email alert settings: http://docs.splunk.com/Documentation/Splunk/6.5.1/Alert/EmailNotificationTokens#Server_tokens

In an actual search, you can use | rest splunk_server=local /services/server/info to grab the search head you're running on.

View solution in original post

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You can use $server.serverName$ in the email alert settings: http://docs.splunk.com/Documentation/Splunk/6.5.1/Alert/EmailNotificationTokens#Server_tokens

In an actual search, you can use | rest splunk_server=local /services/server/info to grab the search head you're running on.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Thank you, your rest command answers to my question.
Bye.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...