简体   繁体   中英

Splunkorwarder using ansible

I would like to monitor multiple logs on the universal forwarder. How can i do this? Also when I set forward-server am running out in error. with Enable boot-start somehow i have to accept license manually to finish up the installation. Any suggestions, please?

- name: connect forward server to Splunk server
  command: "{{ splunkbin }} add forward-server {{ item }} -auth {{ splunkcreds }}"
  with_items: "{{ splunkserver }}"
  when: splunkserver is defined
  notify: restart_splunk

- name: Enable Boot Start
  command: "{{ splunkbin }} enable boot-start"

- name: add temporary monitor to create directory
  command: "{{ splunkbin }} add monitor /etc/hosts -auth {{ splunkcreds }}"
  notify: restart_splunk

Use the following to accept the license without prompting

- name: Enable Boot Start
  command: "{{ splunkbin }} enable boot-start --accept-license"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM