Closed mdAliMaaz closed 6 months ago
Can you provide the exact steps you used to install the plugin and the exact steps you used to check it is installed correctly? What versions of logstash and the output plugin are installed?
What user is logstash running as, and what user did you use to install the plugin? It is a somewhat common issue that a plugin is installed as root and the logstash user which the service runs as doesn't have correct permissions to load it.
Download and install public key
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
Add the following in your /etc/yum.repos.d/ directory in a file with a .repo suffix, for example logstash.repo
[logstash-8.x]
name=Elastic repository for 8.x packages
baseurl=https://artifacts.elastic.co/packages/8.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
sudo yum install logstash
Logstash is typically installed in the /usr/share/logstash directory
, and plugins are installed using the /usr/share/logstash/bin/logstash-plugin
command. If your logstash installation directory is different than this, your logstash-plugin command may be in a different location.
/usr/share/logstash/bin/logstash-plugin install logstash-output-dynatrace
Now lets do configuartion
vim /etc/logstash/conf.d/dtingest.conf
and past this code
input { file
{
path => "<PATH_TO_LOGS>"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter { }
output {
#stdout { codec => json }
dynatrace {
ingest_endpoint_url => "<YOUR_API_URL>"
api_key => "<YOUR_API_TOKEN>"
ssl_verify_none => true
}
}
Now let's run it by running this command.
./logstash -f /etc/logstash/conf.d/dtingest.conf
Everything is installed and running with root user permission. After executing the above command we can't see any error or output. Thank you.
we can't see any error or output
No error is good. Are you not seeing the Failed to execute action
from before?
or output
Does this mean you're not seeing logs in Dynatrace or that you're not seeing console logs from logstash?
When we are running Logstash, sometimes it doesn't work, and even when it does, it's really slow in processing logs (meaning we're able to see logs in the web UI after a very long delay).
Is there any update on this? If you're not seeing any errors I'm not sure what would be causing logs to be slow to arrive. It seems to me that your logstash installation may be corrupt in some way. This is often caused by permissions issues related to installing or running as root.
Environment:
Operating System: Rhel 8.4
Steps to Reproduce:
Expected Behavior:
The 'dynatrace' output plugin should be loaded successfully, and Logstash should start without errors.
Actual Behavior:
Logstash fails to start due to an error loading the 'dynatrace' output plugin. The error message indicates that the plugin cannot be found or is not installed correctly.
Additional Information:
our configuration file looks like this
actual logs