splunkmonitormessage= subprocess.Popen(["sudo", "/opt/splunkforwarder/bin/splunk", "add monitor", path], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
(香港專業教育學院還試圖STR(路徑))的Splunk和Python命令
拋出一個錯誤:
Command error: The subcommand '/opt/logs/node_Default_Node.log' is not valid for command 'add monitor'. Data forwarding configuration management tools.
Commands: enable local-index [-parameter ] ... disable local-index [-parameter ] ... display local-index add [forward-server|search-server] server remove [forward-server|search-server] server list [forward-server|search-server]
Objects: forward-server a Splunk forwarder to forward data to be indexed search-server a Splunk server to forward searches local-index a local search index on the Splunk server
sudo /opt/splunkforwarder/bin/splunk add monitor /opt/logs/node_Default_Node.log
作品完全罰款
我是什麼做錯了?
呃,我知道這會是一件簡單而愚蠢的事情,我做錯了。謝啦。 – asimmons