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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

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 ...