当名称为 hello.imp 的文件低于 10 个字节时,从日志文件创建 Splunk 警报
我正在尝试编写一个 Splunk 查询,它从日志文件中搜索名为 hello.imp 的文件,如果文件大小低于 10 字节,则返回一个输出。我有索引和日志位置,但无法找到确切的查询。请帮助我编写查询并从中创建警报。
I'm trying to write a Splunk query where it searches for a file called hello.imp from a log file and returns with a output if the file size is below 10 bytes. I have the index and log location but unable to find the exact query. Please help me out in a writing a query and creating an alert out of it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过将文件中每个事件的大小相加来获取源文件的大小。像这样:
You can get the size of a source file by adding up the sizes of each event within that file. Like this: