如何成功将Eventgen App添加到Splunk

时间:2019-05-06 15:32:57

标签: splunk

难以将EventGen应用添加到Splunk Enterprise实例中 Splunk 7 Essentials

https://learning.oreilly.com/library/view/splunk-7-essentials/9781788839112/-10天免费试用以获取图书

遵循本书中的所有内容,即

  1. C:/(而不是C:/Program Files)上安装Splunk Enterprise的60试用版

  2. 转到https://github.com/PacktPublishing/Splunk-7-Essentials-Third-Edition并单击绿色按钮“克隆或下载”

  3. 将内容提取到C:/

  4. 将提取的文件重命名为SA-Eventgen

  5. 在管理员模式下打开cmd提示符并运行以下命令

xcopy SA-Eventgen C:SplunketcappsSA-Eventgen /O /X /E /H /K

但是,下一步存在偏差

这本书说你跑步的时候

在命令提示符下

dir C:SplunketcappsSA-Eventgen,您应该

enter image description here

但是当我跑步

dir C:SplunketcappsSA-Eventgen从命令提示符下,我得到

enter image description here

当我重新启动Splunk实例并再次登录时,没有迹象表明已经安装了EventGen应用。

1 个答案:

答案 0 :(得分:0)

书有错字。作者不知何故忘了添加反斜杠

在命令提示符下,用户应键入

urls = ["https://www.pedidosya.com.ar/restaurantes/buenos-aires/recoleta/empanadas-delivery",] with open("output1.csv", 'w', newline='') as csvfile: writer = csv.writer(csvfile, delimiter=',') writer.writerow(['subdomain', 'name', 'url']) for url in urls: base = url+ "?bt=RESTAURANT&page=" page = 1 restaurants = [] while True: soup = bs(requests.get(base + str(page)).text, "html.parser") sections = soup.find_all("section", attrs={"class": "restaurantData"}) if not sections: break for section in sections: for elem in section.find_all("a", href=True, attrs={"class": "arrivalName"}): restaurants.append({"name": elem.text, "url": elem["href"],}) writer.writerow([base+str(page),elem.text,elem["href"]]) page += 1 #reading file = open("output1.csv", 'r') reader = csv.reader(file)

copy SA-Eventgen C:\Splunk\etc\apps\SA-Eventgen /O /X /E /H /K