Install ELK Stack 8 on Debian<\/a><\/p>\n\n\n\nIn the guide above, however, we didn’t cover installation of Logstash. So, once you are done installing Elasticsearch and Kibana, install Logstash. Ensure that all ELK stack components are of similar version number!<\/strong><\/p>\n\n\n\nWe already have ELK stack 8.x repos in place, so let us install Logstash 8;<\/p>\n\n\n\n
apt install logstash<\/code><\/pre>\n\n\n\nIntegrating Wazuh Manager with ELK Stack<\/h3>\n\n\n\nInstall Logstash<\/h4>\n\n\n\n As from Wazuh v4.6.0, Kibana plugins are not supported anymore. Thus, the only way to integrate Wazuh manager with ELK stack is to configure Wazuh manager to sent the security data to Logstash, which processes the data and sent to Elasticsearch indexing and search analytics engine, where you can visualize using Kibana.<\/p>\n\n\n\n
We have already provided a command to install Logstash in the step above. So we are good to proceed.<\/p>\n\n\n\n
As already mentioned before, this is a single node deployment. Hence, we have all the components, Wazuh manager, Kibana, Elasticsearch and Logstash on the same node. You can consider using a distributed deployment for production environments.<\/p>\n\n\n\n
Install Logstash Elasticsearch output plugin<\/h4>\n\n\n\n In in Logstash, output plugins are used to define where events processed by Logstash should be sent. These plugins determine the destination of the data after it has been filtered and processed. Logstash supports a variety of output plugins to facilitate sending data to different destinations. For example, the Elasticsearch output plugin in Logstash is used to send processed and transformed events to an Elasticsearch cluster.<\/p>\n\n\n\n
You can install the plugin on the node running Logstash as follows;<\/p>\n\n\n\n
\/usr\/share\/logstash\/bin\/logstash-plugin install logstash-output-elasticsearch<\/code><\/pre>\n\n\n\nSample installation output;<\/p>\n\n\n\n
Using bundled JDK: \/usr\/share\/logstash\/jdk\nValidating logstash-output-elasticsearch\nResolving mixin dependencies\nUpdating mixin dependencies logstash-mixin-ecs_compatibility_support, logstash-mixin-deprecation_logger_support, logstash-mixin-ca_trusted_fingerprint_support, logstash-mixin-normalize_config_support\nBundler attempted to update logstash-mixin-ecs_compatibility_support but its version stayed the same\nBundler attempted to update logstash-mixin-deprecation_logger_support but its version stayed the same\nBundler attempted to update logstash-mixin-ca_trusted_fingerprint_support but its version stayed the same\nBundler attempted to update logstash-mixin-normalize_config_support but its version stayed the same\nInstalling logstash-output-elasticsearch\nInstallation successful\n<\/code><\/pre>\n\n\n\nInstall Elasticsearch Mapping Template<\/h4>\n\n\n\n In this step, we will configure Elasticsearch to use a predefined Logstash\/Wazuh mapping template. The mappings define how fields are interpreted by Elasticsearch. This ensures that Elasticsearch can index the Wazuh data collected by Logstash correctly.<\/p>\n\n\n\n
To use a custom Elasticsearch mapping template, you define a valid path to the location of the custom template json file on the Logstash Elasticsearch output configuration using the template<\/strong> option.<\/p>\n\n\n\nThus, run the command below to install Wazuh Elasticsearch mapping template.<\/p>\n\n\n\n
curl -sL https:\/\/packages.wazuh.com\/integrations\/elastic\/4.x-8.x\/dashboards\/wz-es-4.x-8.x-template.json -o \/etc\/logstash\/wazuh.json\n<\/code><\/pre>\n\n\n\nThis is how the template look like by default;<\/p>\n\n\n\n
cat \/etc\/logstash\/wazuh.json<\/code><\/pre>\n\n\n\n{\n \"index_patterns\": \"wazuh-*\",\n \"template\": {\n \"settings\": {\n \"index\": {\n \"routing\": {\n \"allocation\": {\n \"include\": {\n \"_tier_preference\": \"data_content\"\n }\n }\n },\n \"mapping\": {\n \"total_fields\": {\n \"limit\": \"10000\"\n }\n },\n \"refresh_interval\": \"5s\",\n \"number_of_shards\": \"3\",\n \"auto_expand_replicas\": \"0-1\",\n \"query\": {\n \"default_field\": [\n \"GeoLocation.city_name\",\n \"GeoLocation.continent_code\",\n \"GeoLocation.country_code2\",\n \"GeoLocation.country_code3\",\n \"GeoLocation.country_name\",\n \"GeoLocation.ip\",\n \"GeoLocation.postal_code\",\n \"GeoLocation.real_region_name\",\n \"GeoLocation.region_name\",\n \"GeoLocation.timezone\",\n \"agent.id\",\n \"agent.ip\",\n \"agent.name\",\n \"cluster.name\",\n \"cluster.node\",\n \"command\",\n \"data\",\n \"data.action\",\n \"data.audit\",\n \"data.audit.acct\",\n \"data.audit.arch\",\n \"data.audit.auid\",\n \"data.audit.command\",\n \"data.audit.cwd\",\n \"data.audit.dev\",\n \"data.audit.directory.inode\",\n \"data.audit.directory.mode\",\n \"data.audit.directory.name\",\n \"data.audit.egid\",\n \"data.audit.enforcing\",\n \"data.audit.euid\",\n \"data.audit.exe\",\n \"data.audit.execve.a0\",\n \"data.audit.execve.a1\",\n \"data.audit.execve.a2\",\n \"data.audit.execve.a3\",\n \"data.audit.exit\",\n \"data.audit.file.inode\",\n \"data.audit.file.mode\",\n \"data.audit.file.name\",\n \"data.audit.fsgid\",\n \"data.audit.fsuid\",\n \"data.audit.gid\",\n \"data.audit.id\",\n \"data.audit.key\",\n \"data.audit.list\",\n \"data.audit.old-auid\",\n \"data.audit.old-ses\",\n \"data.audit.old_enforcing\",\n \"data.audit.old_prom\",\n \"data.audit.op\",\n \"data.audit.pid\",\n \"data.audit.ppid\",\n \"data.audit.prom\",\n \"data.audit.res\",\n \"data.audit.session\",\n \"data.audit.sgid\",\n \"data.audit.srcip\",\n \"data.audit.subj\",\n \"data.audit.success\",\n \"data.audit.suid\",\n \"data.audit.syscall\",\n \"data.audit.tty\",\n \"data.audit.uid\",\n \"data.aws.accountId\",\n \"data.aws.account_id\",\n \"data.aws.action\",\n \"data.aws.actor\",\n \"data.aws.aws_account_id\",\n \"data.aws.description\",\n \"data.aws.dstport\",\n \"data.aws.errorCode\",\n \"data.aws.errorMessage\",\n \"data.aws.eventID\",\n \"data.aws.eventName\",\n \"data.aws.eventSource\",\n \"data.aws.eventType\",\n \"data.aws.id\",\n \"data.aws.name\",\n \"data.aws.requestParameters.accessKeyId\",\n \"data.aws.requestParameters.bucketName\",\n \"data.aws.requestParameters.gatewayId\",\n \"data.aws.requestParameters.groupDescription\",\n \"data.aws.requestParameters.groupId\",\n \"data.aws.requestParameters.groupName\",\n \"data.aws.requestParameters.host\",\n \"data.aws.requestParameters.hostedZoneId\",\n \"data.aws.requestParameters.instanceId\",\n \"data.aws.requestParameters.instanceProfileName\",\n \"data.aws.requestParameters.loadBalancerName\",\n \"data.aws.requestParameters.loadBalancerPorts\",\n \"data.aws.requestParameters.masterUserPassword\",\n \"data.aws.requestParameters.masterUsername\",\n \"data.aws.requestParameters.name\",\n \"data.aws.requestParameters.natGatewayId\",\n \"data.aws.requestParameters.networkAclId\",\n \"data.aws.requestParameters.path\",\n \"data.aws.requestParameters.policyName\",\n \"data.aws.requestParameters.port\",\n \"data.aws.requestParameters.stackId\",\n \"data.aws.requestParameters.stackName\",\n \"data.aws.requestParameters.subnetId\",\n \"data.aws.requestParameters.subnetIds\",\n \"data.aws.requestParameters.volumeId\",\n \"data.aws.requestParameters.vpcId\",\n \"data.aws.resource.accessKeyDetails.accessKeyId\",\n \"data.aws.resource.accessKeyDetails.principalId\",\n \"data.aws.resource.accessKeyDetails.userName\",\n \"data.aws.resource.instanceDetails.instanceId\",\n \"data.aws.resource.instanceDetails.instanceState\",\n \"data.aws.resource.instanceDetails.networkInterfaces.privateDnsName\",\n \"data.aws.resource.instanceDetails.networkInterfaces.publicDnsName\",\n \"data.aws.resource.instanceDetails.networkInterfaces.subnetId\",\n \"data.aws.resource.instanceDetails.networkInterfaces.vpcId\",\n \"data.aws.resource.instanceDetails.tags.value\",\n \"data.aws.responseElements.AssociateVpcCidrBlockResponse.vpcId\",\n \"data.aws.responseElements.description\",\n \"data.aws.responseElements.instanceId\",\n \"data.aws.responseElements.instances.instanceId\",\n \"data.aws.responseElements.instancesSet.items.instanceId\",\n \"data.aws.responseElements.listeners.port\",\n \"data.aws.responseElements.loadBalancerName\",\n \"data.aws.responseElements.loadBalancers.vpcId\",\n \"data.aws.responseElements.loginProfile.userName\",\n \"data.aws.responseElements.networkAcl.vpcId\",\n \"data.aws.responseElements.ownerId\",\n \"data.aws.responseElements.publicIp\",\n \"data.aws.responseElements.user.userId\",\n \"data.aws.responseElements.user.userName\",\n \"data.aws.responseElements.volumeId\",\n \"data.aws.service.serviceName\",\n \"data.aws.severity\",\n \"data.aws.source\",\n \"data.aws.sourceIPAddress\",\n \"data.aws.srcport\",\n \"data.aws.userIdentity.accessKeyId\",\n \"data.aws.userIdentity.accountId\",\n \"data.aws.userIdentity.userName\",\n \"data.aws.vpcEndpointId\",\n \"data.command\",\n \"data.data\",\n \"data.docker.Actor.Attributes.container\",\n \"data.docker.Actor.Attributes.image\",\n \"data.docker.Actor.Attributes.name\",\n \"data.docker.Actor.ID\",\n \"data.docker.id\",\n \"data.docker.message\",\n \"data.docker.status\",\n \"data.dstip\",\n \"data.dstport\",\n \"data.dstuser\",\n \"data.extra_data\",\n \"data.hardware.serial\",\n \"data.id\",\n \"data.integration\",\n \"data.netinfo.iface.adapter\",\n \"data.netinfo.iface.ipv4.address\",\n \"data.netinfo.iface.ipv6.address\",\n \"data.netinfo.iface.mac\",\n \"data.netinfo.iface.name\",\n \"data.os.architecture\",\n \"data.os.build\",\n \"data.os.codename\",\n \"data.os.hostname\",\n \"data.os.major\",\n \"data.os.minor\",\n \"data.os.name\",\n \"data.os.platform\",\n \"data.os.release\",\n \"data.os.release_version\",\n \"data.os.sysname\",\n \"data.os.version\",\n \"data.oscap.check.description\",\n \"data.oscap.check.id\",\n \"data.oscap.check.identifiers\",\n \"data.oscap.check.oval.id\",\n \"data.oscap.check.rationale\",\n \"data.oscap.check.references\",\n \"data.oscap.check.result\",\n \"data.oscap.check.severity\",\n \"data.oscap.check.title\",\n \"data.oscap.scan.benchmark.id\",\n \"data.oscap.scan.content\",\n \"data.oscap.scan.id\",\n \"data.oscap.scan.profile.id\",\n \"data.oscap.scan.profile.title\",\n \"data.osquery.columns.address\",\n \"data.osquery.columns.command\",\n \"data.osquery.columns.description\",\n \"data.osquery.columns.dst_ip\",\n \"data.osquery.columns.gid\",\n \"data.osquery.columns.hostname\",\n \"data.osquery.columns.md5\",\n \"data.osquery.columns.path\",\n \"data.osquery.columns.sha1\",\n \"data.osquery.columns.sha256\",\n \"data.osquery.columns.src_ip\",\n \"data.osquery.columns.user\",\n \"data.osquery.columns.username\",\n \"data.osquery.name\",\n \"data.osquery.pack\",\n \"data.port.process\",\n \"data.port.protocol\",\n \"data.port.state\",\n \"data.process.args\",\n \"data.process.cmd\",\n \"data.process.egroup\",\n \"data.process.euser\",\n \"data.process.fgroup\",\n \"data.process.name\",\n \"data.process.rgroup\",\n \"data.process.ruser\",\n \"data.process.sgroup\",\n \"data.process.state\",\n \"data.process.suser\",\n \"data.program.architecture\",\n \"data.program.description\",\n \"data.program.format\",\n \"data.program.location\",\n \"data.program.multiarch\",\n \"data.program.name\",\n \"data.program.priority\",\n \"data.program.section\",\n \"data.program.source\",\n \"data.program.vendor\",\n \"data.program.version\",\n \"data.protocol\",\n \"data.pwd\",\n \"data.sca\",\n \"data.sca.check.compliance.cis\",\n \"data.sca.check.compliance.cis_csc\",\n \"data.sca.check.compliance.pci_dss\",\n \"data.sca.check.compliance.hipaa\",\n \"data.sca.check.compliance.nist_800_53\",\n \"data.sca.check.description\",\n \"data.sca.check.directory\",\n \"data.sca.check.file\",\n \"data.sca.check.id\",\n \"data.sca.check.previous_result\",\n \"data.sca.check.process\",\n \"data.sca.check.rationale\",\n \"data.sca.check.reason\",\n \"data.sca.check.references\",\n \"data.sca.check.registry\",\n \"data.sca.check.remediation\",\n \"data.sca.check.result\",\n \"data.sca.check.status\",\n \"data.sca.check.title\",\n \"data.sca.description\",\n \"data.sca.file\",\n \"data.sca.invalid\",\n \"data.sca.name\",\n \"data.sca.policy\",\n \"data.sca.policy_id\",\n \"data.sca.scan_id\",\n \"data.sca.total_checks\",\n \"data.script\",\n \"data.src_ip\",\n \"data.src_port\",\n \"data.srcip\",\n \"data.srcport\",\n \"data.srcuser\",\n \"data.status\",\n \"data.system_name\",\n \"data.title\",\n \"data.tty\",\n \"data.uid\",\n \"data.url\",\n \"data.virustotal.description\",\n \"data.virustotal.error\",\n \"data.virustotal.found\",\n \"data.virustotal.permalink\",\n \"data.virustotal.scan_date\",\n \"data.virustotal.sha1\",\n \"data.virustotal.source.alert_id\",\n \"data.virustotal.source.file\",\n \"data.virustotal.source.md5\",\n \"data.virustotal.source.sha1\",\n \"data.vulnerability.cve\",\n \"data.vulnerability.cvss.cvss2.base_score\",\n \"data.vulnerability.cvss.cvss2.exploitability_score\",\n \"data.vulnerability.cvss.cvss2.impact_score\",\n \"data.vulnerability.cvss.cvss2.vector.access_complexity\",\n \"data.vulnerability.cvss.cvss2.vector.attack_vector\",\n \"data.vulnerability.cvss.cvss2.vector.authentication\",\n \"data.vulnerability.cvss.cvss2.vector.availability\",\n \"data.vulnerability.cvss.cvss2.vector.confidentiality_impact\",\n \"data.vulnerability.cvss.cvss2.vector.integrity_impact\",\n \"data.vulnerability.cvss.cvss2.vector.privileges_required\",\n \"data.vulnerability.cvss.cvss2.vector.scope\",\n \"data.vulnerability.cvss.cvss2.vector.user_interaction\",\n \"data.vulnerability.cvss.cvss3.base_score\",\n \"data.vulnerability.cvss.cvss3.exploitability_score\",\n \"data.vulnerability.cvss.cvss3.impact_score\",\n \"data.vulnerability.cvss.cvss3.vector.access_complexity\",\n \"data.vulnerability.cvss.cvss3.vector.attack_vector\",\n \"data.vulnerability.cvss.cvss3.vector.authentication\",\n \"data.vulnerability.cvss.cvss3.vector.availability\",\n \"data.vulnerability.cvss.cvss3.vector.confidentiality_impact\",\n \"data.vulnerability.cvss.cvss3.vector.integrity_impact\",\n \"data.vulnerability.cvss.cvss3.vector.privileges_required\",\n \"data.vulnerability.cvss.cvss3.vector.scope\",\n \"data.vulnerability.cvss.cvss3.vector.user_interaction\",\n \"data.vulnerability.cwe_reference\",\n \"data.vulnerability.package.source\",\n \"data.vulnerability.package.architecture\",\n \"data.vulnerability.package.condition\",\n \"data.vulnerability.package.generated_cpe\",\n \"data.vulnerability.package.name\",\n \"data.vulnerability.package.version\",\n \"data.vulnerability.rationale\",\n \"data.vulnerability.severity\",\n \"data.vulnerability.title\",\n \"data.vulnerability.assigner\",\n \"data.vulnerability.cve_version\",\n \"data.win.eventdata.auditPolicyChanges\",\n \"data.win.eventdata.auditPolicyChangesId\",\n \"data.win.eventdata.binary\",\n \"data.win.eventdata.category\",\n \"data.win.eventdata.categoryId\",\n \"data.win.eventdata.data\",\n \"data.win.eventdata.image\",\n \"data.win.eventdata.ipAddress\",\n \"data.win.eventdata.ipPort\",\n \"data.win.eventdata.keyName\",\n \"data.win.eventdata.logonGuid\",\n \"data.win.eventdata.logonProcessName\",\n \"data.win.eventdata.operation\",\n \"data.win.eventdata.parentImage\",\n \"data.win.eventdata.processId\",\n \"data.win.eventdata.processName\",\n \"data.win.eventdata.providerName\",\n \"data.win.eventdata.returnCode\",\n \"data.win.eventdata.service\",\n \"data.win.eventdata.status\",\n \"data.win.eventdata.subcategory\",\n \"data.win.eventdata.subcategoryGuid\",\n \"data.win.eventdata.subcategoryId\",\n \"data.win.eventdata.subjectDomainName\",\n \"data.win.eventdata.subjectLogonId\",\n \"data.win.eventdata.subjectUserName\",\n \"data.win.eventdata.subjectUserSid\",\n \"data.win.eventdata.targetDomainName\",\n \"data.win.eventdata.targetLinkedLogonId\",\n \"data.win.eventdata.targetLogonId\",\n \"data.win.eventdata.targetUserName\",\n \"data.win.eventdata.targetUserSid\",\n \"data.win.eventdata.workstationName\",\n \"data.win.system.channel\",\n \"data.win.system.computer\",\n \"data.win.system.eventID\",\n \"data.win.system.eventRecordID\",\n \"data.win.system.eventSourceName\",\n \"data.win.system.keywords\",\n \"data.win.system.level\",\n \"data.win.system.message\",\n \"data.win.system.opcode\",\n \"data.win.system.processID\",\n \"data.win.system.providerGuid\",\n \"data.win.system.providerName\",\n \"data.win.system.securityUserID\",\n \"data.win.system.severityValue\",\n \"data.win.system.userID\",\n \"decoder.ftscomment\",\n \"decoder.name\",\n \"decoder.parent\",\n \"full_log\",\n \"host\",\n \"id\",\n \"input\",\n \"location\",\n \"manager.name\",\n \"message\",\n \"offset\",\n \"predecoder.hostname\",\n \"predecoder.program_name\",\n \"previous_log\",\n \"previous_output\",\n \"program_name\",\n \"rule.cis\",\n \"rule.cve\",\n \"rule.description\",\n \"rule.gdpr\",\n \"rule.gpg13\",\n \"rule.groups\",\n \"rule.id\",\n \"rule.info\",\n \"rule.mitre.id\",\n \"rule.mitre.tactic\",\n \"rule.mitre.technique\",\n \"rule.pci_dss\",\n \"rule.hipaa\",\n \"rule.nist_800_53\",\n \"syscheck.audit.effective_user.id\",\n \"syscheck.audit.effective_user.name\",\n \"syscheck.audit.group.id\",\n \"syscheck.audit.group.name\",\n \"syscheck.audit.login_user.id\",\n \"syscheck.audit.login_user.name\",\n \"syscheck.audit.process.id\",\n \"syscheck.audit.process.name\",\n \"syscheck.audit.process.ppid\",\n \"syscheck.audit.user.id\",\n \"syscheck.audit.user.name\",\n \"syscheck.diff\",\n \"syscheck.event\",\n \"syscheck.gid_after\",\n \"syscheck.gid_before\",\n \"syscheck.gname_after\",\n \"syscheck.gname_before\",\n \"syscheck.inode_after\",\n \"syscheck.inode_before\",\n \"syscheck.md5_after\",\n \"syscheck.md5_before\",\n \"syscheck.path\",\n \"syscheck.mode\",\n \"syscheck.perm_after\",\n \"syscheck.perm_before\",\n \"syscheck.sha1_after\",\n \"syscheck.sha1_before\",\n \"syscheck.sha256_after\",\n \"syscheck.sha256_before\",\n \"syscheck.tags\",\n \"syscheck.uid_after\",\n \"syscheck.uid_before\",\n \"syscheck.uname_after\",\n \"syscheck.uname_before\",\n \"title\",\n \"type\"\n ]\n },\n \"number_of_replicas\": \"0\"\n }\n },\n \"mappings\": {\n \"dynamic_templates\": [\n {\n \"string_as_keyword\": {\n \"match_mapping_type\": \"string\",\n \"mapping\": {\n \"type\": \"keyword\"\n }\n }\n }\n ],\n \"date_detection\": false,\n \"properties\": {\n \"@timestamp\": {\n \"type\": \"date\"\n },\n \"@version\": {\n \"type\": \"text\"\n },\n \"GeoLocation\": {\n \"properties\": {\n \"area_code\": {\n \"type\": \"long\"\n },\n \"city_name\": {\n \"type\": \"keyword\"\n },\n \"continent_code\": {\n \"type\": \"text\"\n },\n \"coordinates\": {\n \"type\": \"double\"\n },\n \"country_code2\": {\n \"type\": \"text\"\n },\n \"country_code3\": {\n \"type\": \"text\"\n },\n \"country_name\": {\n \"type\": \"keyword\"\n },\n \"dma_code\": {\n \"type\": \"long\"\n },\n \"ip\": {\n \"type\": \"keyword\"\n },\n \"latitude\": {\n \"type\": \"double\"\n },\n \"location\": {\n \"type\": \"geo_point\"\n },\n \"longitude\": {\n \"type\": \"double\"\n },\n \"postal_code\": {\n \"type\": \"keyword\"\n },\n \"real_region_name\": {\n \"type\": \"keyword\"\n },\n \"region_name\": {\n \"type\": \"keyword\"\n },\n \"timezone\": {\n \"type\": \"text\"\n }\n }\n },\n \"agent\": {\n \"properties\": {\n \"id\": {\n \"type\": \"keyword\"\n },\n \"ip\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"cluster\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n },\n \"node\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"command\": {\n \"type\": \"keyword\"\n },\n \"data\": {\n \"properties\": {\n \"action\": {\n \"type\": \"keyword\"\n },\n \"audit\": {\n \"properties\": {\n \"acct\": {\n \"type\": \"keyword\"\n },\n \"arch\": {\n \"type\": \"keyword\"\n },\n \"auid\": {\n \"type\": \"keyword\"\n },\n \"command\": {\n \"type\": \"keyword\"\n },\n \"cwd\": {\n \"type\": \"keyword\"\n },\n \"dev\": {\n \"type\": \"keyword\"\n },\n \"directory\": {\n \"properties\": {\n \"inode\": {\n \"type\": \"keyword\"\n },\n \"mode\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"egid\": {\n \"type\": \"keyword\"\n },\n \"enforcing\": {\n \"type\": \"keyword\"\n },\n \"euid\": {\n \"type\": \"keyword\"\n },\n \"exe\": {\n \"type\": \"keyword\"\n },\n \"execve\": {\n \"properties\": {\n \"a0\": {\n \"type\": \"keyword\"\n },\n \"a1\": {\n \"type\": \"keyword\"\n },\n \"a2\": {\n \"type\": \"keyword\"\n },\n \"a3\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"exit\": {\n \"type\": \"keyword\"\n },\n \"file\": {\n \"properties\": {\n \"inode\": {\n \"type\": \"keyword\"\n },\n \"mode\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"fsgid\": {\n \"type\": \"keyword\"\n },\n \"fsuid\": {\n \"type\": \"keyword\"\n },\n \"gid\": {\n \"type\": \"keyword\"\n },\n \"id\": {\n \"type\": \"keyword\"\n },\n \"key\": {\n \"type\": \"keyword\"\n },\n \"list\": {\n \"type\": \"keyword\"\n },\n \"old-auid\": {\n \"type\": \"keyword\"\n },\n \"old-ses\": {\n \"type\": \"keyword\"\n },\n \"old_enforcing\": {\n \"type\": \"keyword\"\n },\n \"old_prom\": {\n \"type\": \"keyword\"\n },\n \"op\": {\n \"type\": \"keyword\"\n },\n \"pid\": {\n \"type\": \"keyword\"\n },\n \"ppid\": {\n \"type\": \"keyword\"\n },\n \"prom\": {\n \"type\": \"keyword\"\n },\n \"res\": {\n \"type\": \"keyword\"\n },\n \"session\": {\n \"type\": \"keyword\"\n },\n \"sgid\": {\n \"type\": \"keyword\"\n },\n \"srcip\": {\n \"type\": \"keyword\"\n },\n \"subj\": {\n \"type\": \"keyword\"\n },\n \"success\": {\n \"type\": \"keyword\"\n },\n \"suid\": {\n \"type\": \"keyword\"\n },\n \"syscall\": {\n \"type\": \"keyword\"\n },\n \"tty\": {\n \"type\": \"keyword\"\n },\n \"type\": {\n \"type\": \"keyword\"\n },\n \"uid\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"aws\": {\n \"properties\": {\n \"accountId\": {\n \"type\": \"keyword\"\n },\n \"bytes\": {\n \"type\": \"long\"\n },\n \"createdAt\": {\n \"type\": \"date\"\n },\n \"dstaddr\": {\n \"type\": \"ip\"\n },\n \"end\": {\n \"type\": \"date\"\n },\n \"log_info\": {\n \"properties\": {\n \"s3bucket\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"region\": {\n \"type\": \"keyword\"\n },\n \"resource\": {\n \"properties\": {\n \"instanceDetails\": {\n \"properties\": {\n \"launchTime\": {\n \"type\": \"date\"\n },\n \"networkInterfaces\": {\n \"properties\": {\n \"privateIpAddress\": {\n \"type\": \"ip\"\n },\n \"publicIp\": {\n \"type\": \"ip\"\n }\n }\n }\n }\n }\n }\n },\n \"service\": {\n \"properties\": {\n \"action\": {\n \"properties\": {\n \"networkConnectionAction\": {\n \"properties\": {\n \"remoteIpDetails\": {\n \"properties\": {\n \"geoLocation\": {\n \"type\": \"geo_point\"\n },\n \"ipAddressV4\": {\n \"type\": \"ip\"\n }\n }\n }\n }\n }\n }\n },\n \"count\": {\n \"type\": \"long\"\n },\n \"eventFirstSeen\": {\n \"type\": \"date\"\n },\n \"eventLastSeen\": {\n \"type\": \"date\"\n }\n }\n },\n \"source\": {\n \"type\": \"keyword\"\n },\n \"source_ip_address\": {\n \"type\": \"ip\"\n },\n \"srcaddr\": {\n \"type\": \"ip\"\n },\n \"start\": {\n \"type\": \"date\"\n },\n \"updatedAt\": {\n \"type\": \"date\"\n }\n }\n },\n \"cis\": {\n \"properties\": {\n \"benchmark\": {\n \"type\": \"keyword\"\n },\n \"error\": {\n \"type\": \"long\"\n },\n \"fail\": {\n \"type\": \"long\"\n },\n \"group\": {\n \"type\": \"keyword\"\n },\n \"notchecked\": {\n \"type\": \"long\"\n },\n \"pass\": {\n \"type\": \"long\"\n },\n \"result\": {\n \"type\": \"keyword\"\n },\n \"rule_title\": {\n \"type\": \"keyword\"\n },\n \"score\": {\n \"type\": \"long\"\n },\n \"timestamp\": {\n \"type\": \"keyword\"\n },\n \"unknown\": {\n \"type\": \"long\"\n }\n }\n },\n \"command\": {\n \"type\": \"keyword\"\n },\n \"data\": {\n \"type\": \"keyword\"\n },\n \"docker\": {\n \"properties\": {\n \"Action\": {\n \"type\": \"keyword\"\n },\n \"Actor\": {\n \"properties\": {\n \"Attributes\": {\n \"properties\": {\n \"image\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n },\n \"Type\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"dstip\": {\n \"type\": \"keyword\"\n },\n \"dstport\": {\n \"type\": \"keyword\"\n },\n \"dstuser\": {\n \"type\": \"keyword\"\n },\n \"extra_data\": {\n \"type\": \"keyword\"\n },\n \"gcp\": {\n \"properties\": {\n \"jsonPayload\": {\n \"properties\": {\n \"authAnswer\": {\n \"type\": \"keyword\"\n },\n \"queryName\": {\n \"type\": \"keyword\"\n },\n \"responseCode\": {\n \"type\": \"keyword\"\n },\n \"vmInstanceId\": {\n \"type\": \"keyword\"\n },\n \"vmInstanceName\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"resource\": {\n \"properties\": {\n \"labels\": {\n \"properties\": {\n \"location\": {\n \"type\": \"keyword\"\n },\n \"project_id\": {\n \"type\": \"keyword\"\n },\n \"source_type\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"type\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"severity\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"github\": {\n \"properties\": {\n \"action\": {\n \"type\": \"keyword\"\n },\n \"actor\": {\n \"type\": \"keyword\"\n },\n \"actor_location\": {\n \"properties\": {\n \"country_code\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"org\": {\n \"type\": \"keyword\"\n },\n \"repo\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"hardware\": {\n \"properties\": {\n \"cpu_cores\": {\n \"type\": \"long\"\n },\n \"cpu_mhz\": {\n \"type\": \"double\"\n },\n \"cpu_name\": {\n \"type\": \"keyword\"\n },\n \"ram_free\": {\n \"type\": \"long\"\n },\n \"ram_total\": {\n \"type\": \"long\"\n },\n \"ram_usage\": {\n \"type\": \"long\"\n },\n \"serial\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"id\": {\n \"type\": \"keyword\"\n },\n \"integration\": {\n \"type\": \"keyword\"\n },\n \"netinfo\": {\n \"properties\": {\n \"iface\": {\n \"properties\": {\n \"adapter\": {\n \"type\": \"keyword\"\n },\n \"ipv4\": {\n \"properties\": {\n \"address\": {\n \"type\": \"keyword\"\n },\n \"broadcast\": {\n \"type\": \"keyword\"\n },\n \"dhcp\": {\n \"type\": \"keyword\"\n },\n \"gateway\": {\n \"type\": \"keyword\"\n },\n \"metric\": {\n \"type\": \"long\"\n },\n \"netmask\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"ipv6\": {\n \"properties\": {\n \"address\": {\n \"type\": \"keyword\"\n },\n \"broadcast\": {\n \"type\": \"keyword\"\n },\n \"dhcp\": {\n \"type\": \"keyword\"\n },\n \"gateway\": {\n \"type\": \"keyword\"\n },\n \"metric\": {\n \"type\": \"long\"\n },\n \"netmask\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"mac\": {\n \"type\": \"keyword\"\n },\n \"mtu\": {\n \"type\": \"long\"\n },\n \"name\": {\n \"type\": \"keyword\"\n },\n \"rx_bytes\": {\n \"type\": \"long\"\n },\n \"rx_dropped\": {\n \"type\": \"long\"\n },\n \"rx_errors\": {\n \"type\": \"long\"\n },\n \"rx_packets\": {\n \"type\": \"long\"\n },\n \"state\": {\n \"type\": \"keyword\"\n },\n \"tx_bytes\": {\n \"type\": \"long\"\n },\n \"tx_dropped\": {\n \"type\": \"long\"\n },\n \"tx_errors\": {\n \"type\": \"long\"\n },\n \"tx_packets\": {\n \"type\": \"long\"\n },\n \"type\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n },\n \"office365\": {\n \"properties\": {\n \"Actor\": {\n \"properties\": {\n \"ID\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"ClientIP\": {\n \"type\": \"keyword\"\n },\n \"Operation\": {\n \"type\": \"keyword\"\n },\n \"ResultStatus\": {\n \"type\": \"keyword\"\n },\n \"Subscription\": {\n \"type\": \"keyword\"\n },\n \"UserId\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"os\": {\n \"properties\": {\n \"architecture\": {\n \"type\": \"keyword\"\n },\n \"build\": {\n \"type\": \"keyword\"\n },\n \"codename\": {\n \"type\": \"keyword\"\n },\n \"display_version\": {\n \"type\": \"keyword\"\n },\n \"hostname\": {\n \"type\": \"keyword\"\n },\n \"major\": {\n \"type\": \"keyword\"\n },\n \"minor\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n },\n \"patch\": {\n \"type\": \"keyword\"\n },\n \"platform\": {\n \"type\": \"keyword\"\n },\n \"release\": {\n \"type\": \"keyword\"\n },\n \"release_version\": {\n \"type\": \"keyword\"\n },\n \"sysname\": {\n \"type\": \"keyword\"\n },\n \"version\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"oscap\": {\n \"properties\": {\n \"check\": {\n \"properties\": {\n \"description\": {\n \"type\": \"text\"\n },\n \"id\": {\n \"type\": \"keyword\"\n },\n \"identifiers\": {\n \"type\": \"text\"\n },\n \"oval\": {\n \"properties\": {\n \"id\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"rationale\": {\n \"type\": \"text\"\n },\n \"references\": {\n \"type\": \"text\"\n },\n \"result\": {\n \"type\": \"keyword\"\n },\n \"severity\": {\n \"type\": \"keyword\"\n },\n \"title\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"scan\": {\n \"properties\": {\n \"benchmark\": {\n \"properties\": {\n \"id\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"content\": {\n \"type\": \"keyword\"\n },\n \"id\": {\n \"type\": \"keyword\"\n },\n \"profile\": {\n \"properties\": {\n \"id\": {\n \"type\": \"keyword\"\n },\n \"title\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"return_code\": {\n \"type\": \"long\"\n },\n \"score\": {\n \"type\": \"double\"\n }\n }\n }\n }\n },\n \"osquery\": {\n \"properties\": {\n \"action\": {\n \"type\": \"keyword\"\n },\n \"calendarTime\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n },\n \"pack\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"port\": {\n \"properties\": {\n \"inode\": {\n \"type\": \"long\"\n },\n \"local_ip\": {\n \"type\": \"ip\"\n },\n \"local_port\": {\n \"type\": \"long\"\n },\n \"pid\": {\n \"type\": \"long\"\n },\n \"process\": {\n \"type\": \"keyword\"\n },\n \"protocol\": {\n \"type\": \"keyword\"\n },\n \"remote_ip\": {\n \"type\": \"ip\"\n },\n \"remote_port\": {\n \"type\": \"long\"\n },\n \"rx_queue\": {\n \"type\": \"long\"\n },\n \"state\": {\n \"type\": \"keyword\"\n },\n \"tx_queue\": {\n \"type\": \"long\"\n }\n }\n },\n \"process\": {\n \"properties\": {\n \"args\": {\n \"type\": \"keyword\"\n },\n \"cmd\": {\n \"type\": \"keyword\"\n },\n \"egroup\": {\n \"type\": \"keyword\"\n },\n \"euser\": {\n \"type\": \"keyword\"\n },\n \"fgroup\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n },\n \"nice\": {\n \"type\": \"long\"\n },\n \"nlwp\": {\n \"type\": \"long\"\n },\n \"pgrp\": {\n \"type\": \"long\"\n },\n \"pid\": {\n \"type\": \"long\"\n },\n \"ppid\": {\n \"type\": \"long\"\n },\n \"priority\": {\n \"type\": \"long\"\n },\n \"processor\": {\n \"type\": \"long\"\n },\n \"resident\": {\n \"type\": \"long\"\n },\n \"rgroup\": {\n \"type\": \"keyword\"\n },\n \"ruser\": {\n \"type\": \"keyword\"\n },\n \"session\": {\n \"type\": \"long\"\n },\n \"sgroup\": {\n \"type\": \"keyword\"\n },\n \"share\": {\n \"type\": \"long\"\n },\n \"size\": {\n \"type\": \"long\"\n },\n \"start_time\": {\n \"type\": \"long\"\n },\n \"state\": {\n \"type\": \"keyword\"\n },\n \"stime\": {\n \"type\": \"long\"\n },\n \"suser\": {\n \"type\": \"keyword\"\n },\n \"tgid\": {\n \"type\": \"long\"\n },\n \"tty\": {\n \"type\": \"long\"\n },\n \"utime\": {\n \"type\": \"long\"\n },\n \"vm_size\": {\n \"type\": \"long\"\n }\n }\n },\n \"program\": {\n \"properties\": {\n \"architecture\": {\n \"type\": \"keyword\"\n },\n \"description\": {\n \"type\": \"keyword\"\n },\n \"format\": {\n \"type\": \"keyword\"\n },\n \"install_time\": {\n \"type\": \"keyword\"\n },\n \"location\": {\n \"type\": \"keyword\"\n },\n \"multiarch\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n },\n \"priority\": {\n \"type\": \"keyword\"\n },\n \"section\": {\n \"type\": \"keyword\"\n },\n \"size\": {\n \"type\": \"long\"\n },\n \"source\": {\n \"type\": \"keyword\"\n },\n \"vendor\": {\n \"type\": \"keyword\"\n },\n \"version\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"protocol\": {\n \"type\": \"keyword\"\n },\n \"sca\": {\n \"properties\": {\n \"check\": {\n \"properties\": {\n \"compliance\": {\n \"properties\": {\n \"cis\": {\n \"type\": \"keyword\"\n },\n \"cis_csc\": {\n \"type\": \"keyword\"\n },\n \"hipaa\": {\n \"type\": \"keyword\"\n },\n \"nist_800_53\": {\n \"type\": \"keyword\"\n },\n \"pci_dss\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"description\": {\n \"type\": \"keyword\"\n },\n \"directory\": {\n \"type\": \"keyword\"\n },\n \"file\": {\n \"type\": \"keyword\"\n },\n \"id\": {\n \"type\": \"keyword\"\n },\n \"previous_result\": {\n \"type\": \"keyword\"\n },\n \"process\": {\n \"type\": \"keyword\"\n },\n \"rationale\": {\n \"type\": \"keyword\"\n },\n \"reason\": {\n \"type\": \"keyword\"\n },\n \"references\": {\n \"type\": \"keyword\"\n },\n \"registry\": {\n \"type\": \"keyword\"\n },\n \"remediation\": {\n \"type\": \"keyword\"\n },\n \"result\": {\n \"type\": \"keyword\"\n },\n \"title\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"description\": {\n \"type\": \"keyword\"\n },\n \"failed\": {\n \"type\": \"integer\"\n },\n \"file\": {\n \"type\": \"keyword\"\n },\n \"invalid\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n },\n \"passed\": {\n \"type\": \"integer\"\n },\n \"policy\": {\n \"type\": \"keyword\"\n },\n \"policy_id\": {\n \"type\": \"keyword\"\n },\n \"scan_id\": {\n \"type\": \"keyword\"\n },\n \"score\": {\n \"type\": \"long\"\n },\n \"total_checks\": {\n \"type\": \"keyword\"\n },\n \"type\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"srcip\": {\n \"type\": \"keyword\"\n },\n \"srcport\": {\n \"type\": \"keyword\"\n },\n \"srcuser\": {\n \"type\": \"keyword\"\n },\n \"status\": {\n \"type\": \"keyword\"\n },\n \"system_name\": {\n \"type\": \"keyword\"\n },\n \"timestamp\": {\n \"type\": \"date\"\n },\n \"title\": {\n \"type\": \"keyword\"\n },\n \"type\": {\n \"type\": \"keyword\"\n },\n \"uid\": {\n \"type\": \"keyword\"\n },\n \"url\": {\n \"type\": \"keyword\"\n },\n \"virustotal\": {\n \"properties\": {\n \"description\": {\n \"type\": \"keyword\"\n },\n \"error\": {\n \"type\": \"keyword\"\n },\n \"found\": {\n \"type\": \"keyword\"\n },\n \"malicious\": {\n \"type\": \"keyword\"\n },\n \"permalink\": {\n \"type\": \"keyword\"\n },\n \"positives\": {\n \"type\": \"keyword\"\n },\n \"scan_date\": {\n \"type\": \"keyword\"\n },\n \"sha1\": {\n \"type\": \"keyword\"\n },\n \"source\": {\n \"properties\": {\n \"alert_id\": {\n \"type\": \"keyword\"\n },\n \"file\": {\n \"type\": \"keyword\"\n },\n \"md5\": {\n \"type\": \"keyword\"\n },\n \"sha1\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"total\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"vulnerability\": {\n \"properties\": {\n \"assigner\": {\n \"type\": \"keyword\"\n },\n \"cve\": {\n \"type\": \"keyword\"\n },\n \"cve_version\": {\n \"type\": \"keyword\"\n },\n \"cvss\": {\n \"properties\": {\n \"cvss2\": {\n \"properties\": {\n \"base_score\": {\n \"type\": \"keyword\"\n },\n \"exploitability_score\": {\n \"type\": \"keyword\"\n },\n \"impact_score\": {\n \"type\": \"keyword\"\n },\n \"vector\": {\n \"properties\": {\n \"access_complexity\": {\n \"type\": \"keyword\"\n },\n \"attack_vector\": {\n \"type\": \"keyword\"\n },\n \"authentication\": {\n \"type\": \"keyword\"\n },\n \"availability\": {\n \"type\": \"keyword\"\n },\n \"confidentiality_impact\": {\n \"type\": \"keyword\"\n },\n \"integrity_impact\": {\n \"type\": \"keyword\"\n },\n \"privileges_required\": {\n \"type\": \"keyword\"\n },\n \"scope\": {\n \"type\": \"keyword\"\n },\n \"user_interaction\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n },\n \"cvss3\": {\n \"properties\": {\n \"base_score\": {\n \"type\": \"keyword\"\n },\n \"exploitability_score\": {\n \"type\": \"keyword\"\n },\n \"impact_score\": {\n \"type\": \"keyword\"\n },\n \"vector\": {\n \"properties\": {\n \"access_complexity\": {\n \"type\": \"keyword\"\n },\n \"attack_vector\": {\n \"type\": \"keyword\"\n },\n \"authentication\": {\n \"type\": \"keyword\"\n },\n \"availability\": {\n \"type\": \"keyword\"\n },\n \"confidentiality_impact\": {\n \"type\": \"keyword\"\n },\n \"integrity_impact\": {\n \"type\": \"keyword\"\n },\n \"privileges_required\": {\n \"type\": \"keyword\"\n },\n \"scope\": {\n \"type\": \"keyword\"\n },\n \"user_interaction\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n }\n },\n \"cwe_reference\": {\n \"type\": \"keyword\"\n },\n \"package\": {\n \"properties\": {\n \"architecture\": {\n \"type\": \"keyword\"\n },\n \"condition\": {\n \"type\": \"keyword\"\n },\n \"generated_cpe\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n },\n \"source\": {\n \"type\": \"keyword\"\n },\n \"version\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"published\": {\n \"type\": \"date\"\n },\n \"rationale\": {\n \"type\": \"keyword\"\n },\n \"severity\": {\n \"type\": \"keyword\"\n },\n \"title\": {\n \"type\": \"keyword\"\n },\n \"updated\": {\n \"type\": \"date\"\n }\n }\n }\n }\n },\n \"decoder\": {\n \"properties\": {\n \"accumulate\": {\n \"type\": \"long\"\n },\n \"fts\": {\n \"type\": \"long\"\n },\n \"ftscomment\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n },\n \"parent\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"full_log\": {\n \"type\": \"text\"\n },\n \"host\": {\n \"type\": \"keyword\"\n },\n \"id\": {\n \"type\": \"keyword\"\n },\n \"input\": {\n \"properties\": {\n \"type\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"location\": {\n \"type\": \"keyword\"\n },\n \"manager\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"message\": {\n \"type\": \"text\"\n },\n \"offset\": {\n \"type\": \"keyword\"\n },\n \"predecoder\": {\n \"properties\": {\n \"hostname\": {\n \"type\": \"keyword\"\n },\n \"program_name\": {\n \"type\": \"keyword\"\n },\n \"timestamp\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"previous_log\": {\n \"type\": \"text\"\n },\n \"previous_output\": {\n \"type\": \"keyword\"\n },\n \"program_name\": {\n \"type\": \"keyword\"\n },\n \"rule\": {\n \"properties\": {\n \"cis\": {\n \"type\": \"keyword\"\n },\n \"cve\": {\n \"type\": \"keyword\"\n },\n \"description\": {\n \"type\": \"keyword\"\n },\n \"firedtimes\": {\n \"type\": \"long\"\n },\n \"frequency\": {\n \"type\": \"long\"\n },\n \"gdpr\": {\n \"type\": \"keyword\"\n },\n \"gpg13\": {\n \"type\": \"keyword\"\n },\n \"groups\": {\n \"type\": \"keyword\"\n },\n \"hipaa\": {\n \"type\": \"keyword\"\n },\n \"id\": {\n \"type\": \"keyword\"\n },\n \"info\": {\n \"type\": \"keyword\"\n },\n \"level\": {\n \"type\": \"long\"\n },\n \"mail\": {\n \"type\": \"boolean\"\n },\n \"mitre\": {\n \"properties\": {\n \"id\": {\n \"type\": \"keyword\"\n },\n \"tactic\": {\n \"type\": \"keyword\"\n },\n \"technique\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"nist_800_53\": {\n \"type\": \"keyword\"\n },\n \"pci_dss\": {\n \"type\": \"keyword\"\n },\n \"tsc\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"syscheck\": {\n \"properties\": {\n \"audit\": {\n \"properties\": {\n \"effective_user\": {\n \"properties\": {\n \"id\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"group\": {\n \"properties\": {\n \"id\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"login_user\": {\n \"properties\": {\n \"id\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"process\": {\n \"properties\": {\n \"id\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n },\n \"ppid\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"user\": {\n \"properties\": {\n \"id\": {\n \"type\": \"keyword\"\n },\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n },\n \"diff\": {\n \"type\": \"keyword\"\n },\n \"event\": {\n \"type\": \"keyword\"\n },\n \"gid_after\": {\n \"type\": \"keyword\"\n },\n \"gid_before\": {\n \"type\": \"keyword\"\n },\n \"gname_after\": {\n \"type\": \"keyword\"\n },\n \"gname_before\": {\n \"type\": \"keyword\"\n },\n \"hard_links\": {\n \"type\": \"keyword\"\n },\n \"inode_after\": {\n \"type\": \"keyword\"\n },\n \"inode_before\": {\n \"type\": \"keyword\"\n },\n \"md5_after\": {\n \"type\": \"keyword\"\n },\n \"md5_before\": {\n \"type\": \"keyword\"\n },\n \"mode\": {\n \"type\": \"keyword\"\n },\n \"mtime_after\": {\n \"type\": \"date\",\n \"format\": \"date_optional_time\"\n },\n \"mtime_before\": {\n \"type\": \"date\",\n \"format\": \"date_optional_time\"\n },\n \"path\": {\n \"type\": \"keyword\"\n },\n \"perm_after\": {\n \"type\": \"keyword\"\n },\n \"perm_before\": {\n \"type\": \"keyword\"\n },\n \"sha1_after\": {\n \"type\": \"keyword\"\n },\n \"sha1_before\": {\n \"type\": \"keyword\"\n },\n \"sha256_after\": {\n \"type\": \"keyword\"\n },\n \"sha256_before\": {\n \"type\": \"keyword\"\n },\n \"size_after\": {\n \"type\": \"long\"\n },\n \"size_before\": {\n \"type\": \"long\"\n },\n \"tags\": {\n \"type\": \"keyword\"\n },\n \"uid_after\": {\n \"type\": \"keyword\"\n },\n \"uid_before\": {\n \"type\": \"keyword\"\n },\n \"uname_after\": {\n \"type\": \"keyword\"\n },\n \"uname_before\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"timestamp\": {\n \"type\": \"date\",\n \"format\": \"date_optional_time||epoch_millis\"\n },\n \"title\": {\n \"type\": \"keyword\"\n },\n \"type\": {\n \"type\": \"text\"\n }\n }\n },\n \"aliases\": {}\n },\n \"version\": 1\n}\n<\/code><\/pre>\n\n\n\nNext, you need to configure Logstash to read Wazuh event data. Alert data or information about security alerts that Wazuh has detected\/generated is stored in JSON-formatted file, \/var\/ossec\/logs\/alerts\/alerts.json<\/strong>. You need to therefore configure Logstash to read this Wazuh alert data using the input<\/strong> plugin and forward them to Elasticsearch for indexing using the output<\/strong> plugin.<\/p>\n\n\n\nTherefore, create a Logstash configuration as follows.<\/p>\n\n\n\n
vim \/etc\/logstash\/conf.d\/wazuh.conf<\/code><\/pre>\n\n\n\ninput {\n file {\n id => \"wazuh_alerts\"\n codec => \"json\"\n start_position => \"beginning\"\n stat_interval => \"1 second\"\n path => \"\/var\/ossec\/logs\/alerts\/alerts.json\"\n mode => \"tail\"\n ecs_compatibility => \"disabled\"\n }\n}\n\noutput {\n elasticsearch {\n hosts => \"https:\/\/wazuh-elk:9200\"\n index => \"wazuh-alerts-4.x-%{+YYYY.MM.dd}\"\n user => 'elastic'\n password => 'iXxATQ+do7fYRDKw1XBR'\n ssl => true\n cacert => \"\/etc\/logstash\/elastic.ca.pem\"\n template => \"\/etc\/logstash\/wazuh.json\"\n template_name => \"wazuh\"\n template_overwrite => true\n }\n}\n<\/code><\/pre>\n\n\n\nWhere on the INPUT section;<\/p>\n\n\n\n
\nfile<\/strong>: Specifies that Logstash should read data from a file. You need to add logstash<\/strong> user to wazuh<\/strong> group to be able to read this file.<\/li>\n\n\n\nid<\/strong>: Unique identifier for this input.<\/li>\n\n\n\ncodec<\/strong>: Specifies the codec used for decoding the content of the file. In this case, it’s set to “json,” indicating that the content of the file is in JSON format.<\/li>\n\n\n\nstart_position<\/strong>: Sets the position from where Logstash should start reading the file. In this case, it starts from the beginning of the file.<\/li>\n\n\n\nstat_interval<\/strong>: Defines the interval at which Logstash should check the file for updates (every 1 second in this example).<\/li>\n\n\n\npath<\/strong>: Specifies the path to the file Logstash should read.<\/li>\n\n\n\nmode<\/strong>: Sets the file reading mode to “tail,” meaning Logstash will read new lines that are appended to the file.<\/li>\n\n\n\necs_compatibility<\/strong>: Disables the Elastic Common Schema (ECS) compatibility for the input.<\/li>\n<\/ul>\n\n\n\nOn the OUTPUT section;<\/p>\n\n\n\n
\nelasticsearch:<\/strong> Specifies that Logstash should send the processed data to an Elasticsearch cluster.<\/li>\n\n\n\nhosts:<\/strong> Specifies the Elasticsearch cluster’s address (in this case, “https:\/\/wazuh-elk:9200<\/a>“).<\/li>\n\n\n\nindex:<\/strong> Defines the index name pattern in Elasticsearch, including a date pattern (%{+YYYY.MM.dd}<\/code>) for daily indices.<\/li>\n\n\n\nuser and password:<\/strong> Provide Elasticsearch authentication credentials.<\/li>\n\n\n\nssl:<\/strong> Enables SSL communication.<\/li>\n\n\n\ncacert:<\/strong> Specifies the path to the CA certificate used for SSL verification.<\/li>\n\n\n\ntemplate:<\/strong> Sets the path to an index template file in Elasticsearch. The template file likely defines the mapping and settings for the Elasticsearch index.<\/li>\n\n\n\ntemplate_name:<\/strong> Specifies the name of the template in Elasticsearch.<\/li>\n\n\n\ntemplate_overwrite:<\/strong> Indicates whether to overwrite an existing template with the same name.<\/li>\n<\/ul>\n\n\n\nAs you can see, we have defined the Elastic super user to use in publishing events on the Elasticsearch. You can consider creating a user with specific roles to publish events on the specified index. See more on Create Required Publishing Roles for Logstash User.<\/strong><\/a><\/p>\n\n\n\nYou can also consider using variables to store the user credentials instead of storing them in plain text, especially if you are using a super user such as elastic<\/strong> user as per the guidance here<\/a>.<\/p>\n\n\n\nSimilarly, copy the Elasticsearch CA cert to the specified path.<\/p>\n\n\n\n
cp \/etc\/elasticsearch\/certs\/http_ca.crt \/etc\/logstash\/elastic.ca.pem<\/code><\/pre>\n\n\n\nEnsure logstash owns the file;<\/p>\n\n\n\n
chown logstash: \/etc\/logstash\/elastic.ca.pem<\/code><\/pre>\n\n\n\nAs already mentioned, add logstash<\/strong> user to wazuh<\/strong> group to be able to read the Wazuh event data.<\/p>\n\n\n\nusermod -aG wazuh logstash<\/code><\/pre>\n\n\n\nTest Validity of Logstash Configuration<\/h4>\n\n\n\n Next, check if the Logstash configuration is fine.<\/p>\n\n\n\n
sudo -u logstash \/usr\/share\/logstash\/bin\/logstash --path.settings \/etc\/logstash -t<\/code><\/pre>\n\n\n\nOr to test specific file;<\/p>\n\n\n\n
sudo -u logstash \/usr\/share\/logstash\/bin\/logstash --path.settings \/etc\/logstash -t -f \/etc\/logstash\/conf.d\/wazuh.conf<\/code><\/pre>\n\n\n\nIf you get, Configuration OK<\/strong>, in the output, you are good to go.<\/p>\n\n\n\nRunning Logstash<\/h4>\n\n\n\n Start and enable Logstash to run on system boot;<\/p>\n\n\n\n
systemctl enable --now logstash<\/code><\/pre>\n\n\n\nCheck status;<\/p>\n\n\n\n
systemctl status logstash<\/code><\/pre>\n\n\n\n\u25cf logstash.service - logstash\n Loaded: loaded (\/lib\/systemd\/system\/logstash.service; enabled; preset: enabled)\n Active: active (running) since Sat 2024-03-02 03:11:36 EST; 4s ago\n Main PID: 3784 (java)\n Tasks: 26 (limit: 9475)\n Memory: 405.2M\n CPU: 12.185s\n CGroup: \/system.slice\/logstash.service\n \u2514\u25003784 \/usr\/share\/logstash\/jdk\/bin\/java -XX:+HeapDumpOnOutOfMemoryError -Dlogstash.jackson.stream-read-constraints.max-number-length=10000 --add-opens=java.bas>\n\nMar 02 03:11:36 wazuh-elk systemd[1]: Started logstash.service - logstash.\nMar 02 03:11:36 wazuh-elk logstash[3784]: Using bundled JDK: \/usr\/share\/logstash\/jdk\n<\/code><\/pre>\n\n\n\nCheck the logs;<\/p>\n\n\n\n
journalctl -f -u logstash<\/code><\/pre>\n\n\n\nSample logs;<\/p>\n\n\n\n
Mar 02 03:19:43 wazuh-elk logstash[7949]: [2024-03-02T03:19:43,560][INFO ][logstash.outputs.elasticsearch][main] Not eligible for data streams because config contains one or more settings that are not compatible with data streams: {\"template\"=>\"\/etc\/logstash\/wazuh.json\", \"template_name\"=>\"wazuh\", \"template_overwrite\"=>\"true\", \"index\"=>\"wazuh-alerts-4.x-%{+YYYY.MM.dd}\"}\nMar 02 03:19:43 wazuh-elk logstash[7949]: [2024-03-02T03:19:43,561][INFO ][logstash.outputs.elasticsearch][main] Data streams auto configuration (`data_stream => auto` or unset) resolved to `false`\nMar 02 03:19:43 wazuh-elk logstash[7949]: [2024-03-02T03:19:43,599][INFO ][logstash.outputs.elasticsearch][main] Using mapping template from {:path=>\"\/etc\/logstash\/wazuh.json\"}\nMar 02 03:19:43 wazuh-elk logstash[7949]: [2024-03-02T03:19:43,613][INFO ][logstash.javapipeline ][main] Starting pipeline {:pipeline_id=>\"main\", \"pipeline.workers\"=>4, \"pipeline.batch.size\"=>125, \"pipeline.batch.delay\"=>50, \"pipeline.max_inflight\"=>500, \"pipeline.sources\"=>[\"\/etc\/logstash\/conf.d\/wazuh.conf\"], :thread=>\"#\"}\nMar 02 03:19:43 wazuh-elk logstash[7949]: [2024-03-02T03:19:43,624][INFO ][logstash.outputs.elasticsearch][main] Installing Elasticsearch template {:name=>\"wazuh\"}\nMar 02 03:19:43 wazuh-elk logstash[7949]: [2024-03-02T03:19:43,954][INFO ][logstash.javapipeline ][main] Pipeline Java execution initialization time {\"seconds\"=>0.34}\nMar 02 03:19:43 wazuh-elk logstash[7949]: [2024-03-02T03:19:43,959][INFO ][logstash.inputs.file ][main] No sincedb_path set, generating one based on the \"path\" setting {:sincedb_path=>\"\/var\/lib\/logstash\/plugins\/inputs\/file\/.sincedb_b6991da130c0919d87fbe36c3e98e363\", :path=>[\"\/var\/ossec\/logs\/alerts\/alerts.json\"]}\nMar 02 03:19:43 wazuh-elk logstash[7949]: [2024-03-02T03:19:43,962][INFO ][logstash.javapipeline ][main] Pipeline started {\"pipeline.id\"=>\"main\"}\nMar 02 03:19:43 wazuh-elk logstash[7949]: [2024-03-02T03:19:43,968][INFO ][filewatch.observingtail ][main][wazuh_alerts] START, creating Discoverer, Watch with file and sincedb collections\nMar 02 03:19:43 wazuh-elk logstash[7949]: [2024-03-02T03:19:43,981][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}\n<\/code><\/pre>\n\n\n\nVerify Wazuh Alerts Index Creation on Elasticsearch via Kibana<\/h4>\n\n\n\n You can now access Kibana via the url https:\/\/<server-IP-or-hostname>:5601<\/strong><\/code> and check status of the Wazuh alerts indices:<\/p>\n\n\n\n\nLogin to Kibana using your admin credentials<\/li>\n\n\n\n Navigate to \u2630<\/strong> > Management<\/strong> > Stack Management > Data > Index Management<\/strong>.<\/li>\n<\/ul>\n\n\n\nYou should be able to see Wazuh alerts index pattern created.<\/p>\n\n\n\n\n\t\t\t\n\t\t\t\t \n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\nCreate Wazuh Index patterns on Kibana<\/h4>\n\n\n\n From the management interface above;<\/p>\n\n\n\n
\nGo to Kibana<\/strong> > Data Views<\/strong> and select Create data view<\/strong>.<\/li>\n\n\n\nEnter a name [optional] for the data view and define wazuh-alerts-*<\/code> as the index pattern name.<\/li>\n\n\n\nSelect timestamp<\/strong> in the Timestamp fields<\/strong> dropdown menu. Then Save data view to Kibana<\/strong>.<\/li>\n<\/ul>\n\n\n\n\n\t\t\t\n\t\t\t\t \n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\nNext, verify data on the Kibana discover tab; Select \u2630<\/strong> > Analytics<\/strong> > Discover<\/strong>, select wazuh-alerts-*<\/strong> index pattern to view the data. Adjust the time range accordingly.<\/p>\n\n\n\n\n\t\t\t\n\t\t\t\t \n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\nImport Wazuh Elastic Dashboards<\/h4>\n\n\n\n Wazuh provides several dashboards for Elastic Stack for visualizing the data.<\/p>\n\n\n\n
You can download<\/a> the dashboards;<\/p>\n\n\n\ncurl -Ls https:\/\/packages.wazuh.com\/integrations\/elastic\/4.x-8.x\/dashboards\/wz-es-4.x-8.x-dashboards.ndjson -o wazuh-dashboards.ndjson\n<\/code><\/pre>\n\n\n\nYou can them import from command line;<\/p>\n\n\n\n
curl -k -XPOST \"http:\/\/wazuh-elk:5601\/api\/saved_objects\/_import\" \\\n -H \"kbn-xsrf: true\" \\\n --form file=@wazuh-dashboards.ndjson \\\n -u elastic\n<\/code><\/pre>\n\n\n\nOr from Kibana saved Objects (Management<\/strong> > Stack management<\/strong> > Saved Objects<\/strong> and click Import<\/strong>, select your json file and import).<\/p>\n\n\n\nViewing Wazuh Dashboards on Kibana<\/h4>\n\n\n\n Once you import the dashboards, navigate to Analytics > Dashboards<\/strong>.<\/p>\n\n\n\n\n\t\t\t\n\t\t\t\t \n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\nInstall Wazuh Agents and Visualize the Events Data<\/h4>\n\n\n\n You can now follow the guide below to learn how to install Wazuh agents.<\/p>\n\n\n\n
Easy Way to Install Wazuh Agents on Ubuntu\/Debian<\/a><\/p>\n\n\n\nOnce the agents are intalled and enrolled into the manager, you should be able to utilize the imported dashboards to visualize the events from those systems.<\/p>\n\n\n\n
Sample security events.<\/p>\n\n\n\n <\/figure>\n\n\n\nAnd that is it! One this you will lose with this architecture is the previous capability to manage agents from Kibana\/Wazuh app dashboard.<\/p>\n\n\n\n
Remember this?<\/p>\n\n\n\n <\/figure>\n\n\n\nEither way, you can utilize Wazuh Indexer and Wazuh dashboards for that. See the guide below;<\/p>\n\n\n\n
Install Wazuh SIEM Server on Ubuntu 24.04<\/a><\/p>\n\n\n\nReference<\/h3>\n\n\n\n Step-by-step installation<\/a><\/p>\n\n\n\nOther Tutorials<\/h3>\n\n\n\n Configure ELK Stack Alerting with ElastAlert<\/a><\/p>\n\n\n\nMonitor Linux System Metrics with ELK Stack<\/a><\/p>\n\n\n\nVisualize WordPress User Activity Logs on ELK Stack<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"In this tutorial, you will learn how to integrate Wazuh manager with ELK stack as a unified Security Information and Event management tool. Wazuh consists<\/p>\n","protected":false},"author":3,"featured_media":8817,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[72,910,121,1823],"tags":[912,1852,3509,3507,3505,3506,3508,1828],"class_list":["post-8802","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-monitoring","category-elastic-stack","category-howtos","category-wazuh","tag-elastic-stack","tag-elk-stack","tag-elk-stack-and-wazuh-manager","tag-install-elk-with-wazuh","tag-integrate-wazuh-manager-with-elk-stack","tag-wazuh-app-kibana","tag-wazuh-manager-on-elk","tag-wazuh-server","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/8802"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=8802"}],"version-history":[{"count":15,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/8802\/revisions"}],"predecessor-version":[{"id":21822,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/8802\/revisions\/21822"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/8817"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=8802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=8802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=8802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}