Graylog: Strengthening communication security
This documentation is part of the Using with Python guide. You can view the complete guide here: How to send logs from Python to Graylog.
👋 Welcome to Stackhero documentation
Stackhero offers a fully managed Graylog cloud solution designed for speed and simplicity. You can:
- Count on an unlimited, dedicated SMTP email server included with your service.
- Apply updates easily with a single click, with no manual intervention required.
- Use a custom domain name secured by HTTPS (for example, https://logs.your-company.com), providing your team with secure, direct access.
- Benefit from strong performance and security on a private, dedicated infrastructure with no shared resources or noisy neighbours.
Focus on your data, not your tools: you can get started with Stackhero's Graylog cloud hosting solution in just a few minutes.
Although the previous examples use TLS encryption, they do not validate the certificate. This is fine for testing, but in a production environment, it is important to verify the certificate's validity.
You can enable certificate validation by adding the validate and ca_certs options as shown below:
handler = graypy.GELFTLSHandler('<XXXXXX>.stackhero-network.com', 12201, validate=True, ca_certs='/etc/ssl/certs/ca-certificates.crt')
Make sure the file /etc/ssl/certs/ca-certificates.crt exists on your system:
- On Ubuntu/Debian, you can install it with
sudo apt install ca-certificates. - On Alpine Linux, install it with
apk add ca-certificates. - On macOS, it is installed by default, but the file is named
/etc/ssl/cert.pem.