Hello,
I've got an elastic-agent with no agent monitoring settings (meaning no Agent Logs/Mertrics collection) and only one integration policy.
So my elastic-agent.yml
is pretty small:
id: 949c1a80-c8a9-11ed-8539-532f4758083a
revision: 2
outputs:
default:
type: elasticsearch
hosts:
- 'http://localhost:9200'
username: 'elastic'
password: 'changeme'
output_permissions:
default:
_elastic_agent_monitoring:
indices: []
_elastic_agent_checks:
cluster:
- monitor
c4e5502e-d2ac-428d-bd13-85afdcc371e3:
indices:
- names:
- logs-ti_misp.threat-default
privileges:
- auto_configure
- create_doc
agent:
download:
sourceURI: 'https://artifacts.elastic.co/downloads/'
monitoring:
enabled: false
logs: false
metrics: false
inputs:
- id: httpjson-ti_misp-c4e5502e-d2ac-428d-bd13-85afdcc371e3
name: ti_misp-1
revision: 1
type: httpjson
use_output: default
meta:
package:
name: ti_misp
version: 1.10.1
data_stream:
namespace: default
package_policy_id: c4e5502e-d2ac-428d-bd13-85afdcc371e3
streams:
- id: httpjson-ti_misp.threat-c4e5502e-d2ac-428d-bd13-85afdcc371e3
data_stream:
dataset: ti_misp.threat
type: logs
config_version: '2'
interval: 3m
request.method: POST
request.url: 'https://localhost/events/restSearch'
request.ssl:
verification_mode: none
request.timeout: 30s
request.body: null
request.transforms:
- set:
target: header.Authorization
value: BEpdSXuPb2lRyhVjNy9nHiA7EApYdD9ajMRafBZQ
- set:
target: body.page
value: 1
- set:
target: body.limit
value: 5
- set:
target: body.returnFormat
value: json
- set:
target: body.timestamp
value: '[[.cursor.timestamp]]'
default: '[[ formatDate (now (parseDuration "-6000")) "UnixDate" ]]'
response.split:
target: body.response
split:
target: body.Event.Attribute
ignore_empty_value: true
keep_parent: true
split:
target: body.Event.Object
keep_parent: true
split:
target: body.Event.Object.Attribute
keep_parent: true
response.request_body_on_pagination: true
response.pagination:
- set:
target: body.page
value: >-
[[if (ne (len .last_response.body.response) 0)]][[add
.last_response.page 1]][[end]]
fail_on_template_error: true
cursor:
timestamp:
value: '[[.last_event.Event.timestamp]]'
tags:
- preserve_original_event
- forwarded
- misp-threat
publisher_pipeline.disable_host: true
I have the following info logs from elastic_agent.filebeat
dataset every minutes indefinitely:
{"log.level":"info","@timestamp":"2023-03-22T15:01:57.095+0100","message":"Process another repeated request.","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"httpjson-default","type":"httpjson"},"log":{"source":"httpjson-default"},"log.origin":{"file.line":132,"file.name":"httpjson/input.go"},"log.logger":"input.httpjson-cursor","service.name":"filebeat","id":"httpjson-ti_misp.threat-c4e5502e-d2ac-428d-bd13-85afdcc371e3","input_source":"https://localhost/events/restSearch","input_url":"https://localhost/events/restSearch","ecs.version":"1.6.0","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-03-22T15:01:57.178+0100","message":"request finished: 1 events published","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"httpjson-default","type":"httpjson"},"log":{"source":"httpjson-default"},"log.origin":{"file.line":445,"file.name":"httpjson/request.go"},"service.name":"filebeat","input_source":"https://localhost/events/restSearch","log.logger":"input.httpjson-cursor","id":"httpjson-ti_misp.threat-c4e5502e-d2ac-428d-bd13-85afdcc371e3","input_url":"https://localhost/events/restSearch","ecs.version":"1.6.0","ecs.version":"1.6.0"}
It seem's that only one event were send.
But still no index in elasticsearch:
I've change the interval configuration from ten minutes to 1 minute, and put the timestamp as it collect all events that has a timestamp greater or equal (now - 6000h).
I don't know what the "Process another repeated request" means