cat /var/ossec/logs/integrations.log
Mon Dec 30 13:59:12 UTC 2024 Wrong arguments
Fri Jan 10 19:29:08 UTC 2025 Wrong arguments
cat /var/ossec/logs/ossec.log | grep wazuh-integratord
2025/01/14 14:38:43 wazuh-integratord: INFO: Enabling integration for: 'custom-servicenow'.
2025/01/14 14:38:43 wazuh-integratord: INFO: Enabling integration for: 'custom-abuseipdb.py'.
2025/01/14 15:14:24 wazuh-integratord: INFO: (1225): SIGNAL [(15)-(Terminated)] Received. Exit Cleaning...
2025/01/14 15:14:46 wazuh-integratord[5387] debug_op.c:116 at _log_function(): DEBUG: Logging module auto-initialized
2025/01/14 15:14:46 wazuh-integratord[5387] pthreads_op.c:45 at CreateThreadJoinable(): DEBUG: Thread stack size set to: 8192 KiB
2025/01/14 15:14:46 wazuh-integratord[5387] main.c:165 at main(): DEBUG: Chrooted to directory: /var/ossec, using user: wazuh
2025/01/14 15:14:46 wazuh-integratord[5387] intgcom.c:76 at intgcom_main(): DEBUG: Local requests thread ready
2025/01/14 15:14:46 wazuh-integratord[5387] main.c:176 at main(): INFO: Started (pid: 5387).
2025/01/14 15:14:46 wazuh-integratord[5387] integrator.c:53 at OS_IntegratorD(): DEBUG: JSON file queue connected.
2025/01/14 15:14:46 wazuh-integratord[5387] integrator.c:143 at OS_IntegratorD(): INFO: Enabling integration for: 'custom-servicenow'.
2025/01/14 15:14:46 wazuh-integratord[5387] integrator.c:143 at OS_IntegratorD(): INFO: Enabling integration for: 'custom-abuseipdb.py'.
2025/01/14 15:14:46 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:14:47 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:14:48 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:14:49 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:14:50 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:14:51 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:14:52 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:14:53 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:14:54 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:14:55 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:14:55 wazuh-integratord[5387] integrator.c:161 at OS_IntegratorD(): DEBUG: Sending new alert.
2025/01/14 15:14:55 wazuh-integratord[5387] integrator.c:208 at OS_IntegratorD(): DEBUG: Skipping: Alert level is too low
2025/01/14 15:14:55 wazuh-integratord[5387] integrator.c:272 at OS_IntegratorD(): DEBUG: Skipping: Rule doesn't match.
2025/01/14 15:14:55 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:14:56 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:14:57 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:14:58 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:14:59 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:15:00 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:15:01 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:15:02 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:15:03 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:15:03 wazuh-integratord[5387] integrator.c:161 at OS_IntegratorD(): DEBUG: Sending new alert.
2025/01/14 15:15:03 wazuh-integratord[5387] integrator.c:208 at OS_IntegratorD(): DEBUG: Skipping: Alert level is too low
2025/01/14 15:15:03 wazuh-integratord[5387] integrator.c:272 at OS_IntegratorD(): DEBUG: Skipping: Rule doesn't match.
When I do echo and set the path it to /var/ossec/logs/alerts/alerts.json
2025/01/14 15:16:58 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
2025/01/14 15:16:58 wazuh-integratord[5387] json-queue.c:140 at jqueue_parse_json(): WARNING: Invalid JSON alert read from 'logs/alerts/alerts.json': 'timestamp:2025-01-07T05:30:36.498+0000 rule:level:13 rule:description:PAM: Login session opened. rule:id:5501 rule:mitre:id:[T1078] rule:mitre:tactic:[Defense Evasion rule:mitre:Persistence rule:mitre:Privilege Escalation rule:mitre:Initial Access] rule:mitre:technique:[Valid Accounts] rule:firedtimes:3 rule:mail:false rule:groups:[pam rule:syslog rule:authentication_success] rule:pci_dss:[10.2.5] rule:gpg13:[7.8 rule:7.9] rule:gdpr:[IV_32.2] rule:hipaa:[164.312.b] rule:nist_800_53:[AU.14 rule:AC.7] rule:tsc:[CC6.8 rule:CC7.2 rule:CC7.3] agent:id:000 agent:name:wazuh91 manager:{name:wazuh91} id:1736227836.558781 full_log:Jan 07 05:30:36 wazuh91 su[18147]: pam_unix(su:session): session opened for user root(uid=0) by wazuh91(uid=0) predecoder:program_name:su predecoder:timestamp:Jan 07 05:30:36 predecoder:hostname:wazuh91 decoder:parent:pam decoder:name:pam data:srcuser:wazuh91 data:dstuser:root(uid=0) data:uid:0 location:journald'
2025/01/14 15:16:59 wazuh-integratord[5387] integrator.c:154 at OS_IntegratorD(): DEBUG: jqueue_next()
Although I am using
echo
{"timestamp":"2025-01-07T05:30:36.498+0000","rule":{"level":13,"description":"PAM: Login session opened.","id":"5501","mitre":{"id":["T1078"],"tactic":["Defense Evasion","Persistence","Privilege Escalation","Initial Access"],"technique":["Valid Accounts"]},"firedtimes":3,"mail":false,"groups":["pam","syslog","authentication_success"],"pci_dss":["10.2.5"],"gpg13":["7.8","7.9"],"gdpr":["IV_32.2"],"hipaa":["164.312.b"],"nist_800_53":["AU.14","AC.7"],"tsc":["CC6.8","CC7.2","CC7.3"]},"agent":{"id":"000","name":"wazuh91"},"manager":{"name":"wazuh91"},"id":"1736227836.558781","full_log":"Jan 07 05:30:36 wazuh91 su[18147]: pam_unix(su:session): session opened for user root(uid=0) by wazuh91(uid=0)","predecoder":{"program_name":"su","timestamp":"Jan 07 05:30:36","hostname":"wazuh91"},"decoder":{"parent":"pam","name":"pam"},"data":{"srcuser":"wazuh91","dstuser":"root(uid=0)","uid":"0"},"location":"journald"} >> /var/ossec/logs/alerts/alerts.json
<integration>
<name>custom-servicenow</name>
<level>10</level>
<group>all</group>
<rule_id>all</rule_id>
<alert_format>json</alert_format>
</integration>
reason for level 10 to check if it can get an alert of level 10 and above