官术网_书友最值得收藏!

Controlling Splunk

There are several different ways to stop, start, or restart Splunk. The easiest way to restart Splunk is to do it from the web interface, as demonstrated in the preceding section. The web interface, however, only allows you to restart your Splunk instance. It does not offer any other control options.

The most flexible way to control Splunk is by using the CLI. Using the CLI is an essential skill for Splunk administrators.

In the console or Command Prompt, type in the following command and hit Enter on your keyboard:

Windows: C:> cd C:Splunk\bin
Linux: cd /$SPLUNK_HOME/bin

While in the $SPLUNK_HOME/bin directory, issue the following command to restart Splunk:

Windows: C:Splunk\bin>splunk restart
Linux: [user@server bin]$ ./splunk restart

After issuing this command, splunkd will go through its restart process. Here are the other basic parameters that you can pass to the Splunk application to control Splunk:

Windows:

  • splunk status: Tells you whether splunkd is running or not
  • splunk stop: Stops splunkd and all its processes
  • splunk start: Starts splunkd and all its processes
  • splunk restart: Restarts splunkd and all its processes

Linux:

  • ./splunk status: Tells you whether splunkd is running or not
  • ./splunk stop: Stops splunkd and all its processes
  • ./splunk start: Starts splunkd and all its processes
  • ./splunk restart: Restarts splunkd and all its processes

Doing this from a CLI gives the added benefit of verbose messages. A verbose message is a message with a lot of information in it. Such messages can be useful for making sure the system is working correctly or troubleshooting any errors.

A successful restart of splunkd generally has the following output (elements of which may vary):

In Windows, you can also control Splunk through the Splunkd Service, as shown in the following screenshot. The d in the service name, denoting daemon, means a background process. Note that the second service, splunkweb, is not running. Do not try to start splunkweb as it is deprecated and is there only for legacy purposes. The Splunk-running web application is now bundled in Splunkd Service:

主站蜘蛛池模板: 海伦市| 额济纳旗| 余姚市| 县级市| 吴堡县| 托克托县| 无为县| 商丘市| 剑阁县| 伽师县| 巴里| 仙居县| 林州市| 石台县| 永安市| 苏尼特右旗| 余江县| 贵州省| 普兰店市| 临沂市| 崇礼县| 黄陵县| 太湖县| 错那县| 睢宁县| 北辰区| 襄垣县| 鹿邑县| 孟村| 华安县| 林西县| 改则县| 城固县| 沂南县| 彭州市| 安多县| 微博| 全椒县| 盘山县| 虎林市| 郸城县|