Metricbeat
Using metricbeat to send the metrics to PacketAI
Download Metricbeat
Linux
Download metricbeat using below bash script: https://www.elastic.co/downloads/past-releases/metricbeat-8-4-3
Windows
Download metricbeat using Powershell script:
Configure Metricbeat
Edit metricbeat.yml, use the below metricbeat configuration, we need to customise this according to your requirements, explained in details about each section below. The complete metricbeat configuration can be found here
metricbeat modules
:
To enable the windows module, please run the below command.
metricbeat.exe modules enable windows
There are multiple modules available on metricbeat, they can be enabled to similar to the above command, the list of available modules are listed here.
The list of enabled modules are available in
modules.d
directoryTo disable a module we need to run this command:
metricbeat.exe modules disable windows
output.elasticsearch
:
hosts
: Make sure that your hosts entries are correct.hosts: ["beats-ingester-logpatterns.packetai.co:443"]
change URL if your PacketAI URL's are differentcompression_level is between 0 to 9, 0 being no compression at all, and 9 being best compression, we would suggest to use the value 6. higher compression values means higher cpu usage and lower network usage.
headers
sub section needs to update according to youPAI_IID
andPAI_TOKEN
. you can get them on packetai after login, and under the section ofDeploy PacketAI / Agent
processors:
We need to modify the YOUR_CLUSTER_NAME with appropriate cluster name. clusterName can be used to manage the retention period on PacketAI managed. Please note that clusterName cannot contain character "-". Currently this field is mandatory.
add_cloud_metadata: ~ is optional, this adds the metadata of the cloud. i.e. region, zone, machine_id etc...
add_docker_metadata is optional, this also docker metadata, docker container name, image name, docker labels, etc.... This extra metadata will increase the index size at PacketAI.
Installation of Metricbeat
Linux:
We could run the metricbeat with the below command to start the metricbeat, we need to install a service, if we want to automatically start the metricbeat service on system startup.
systemd service file (metricbeat.service
): Here we are assuming that metricbeat is located at /opt/metricbeat, if the metricbeat is located somewhere please update the metricbeat.service file to reflect the same.
copy the file to /etc/systemd/system
directory, and run the below commands. In
Windows:
In order to install the metricbeat on Windows, we need to run the below command, in metricbeat folder.
Last updated
Was this helpful?