Graylog: Strengthening communication security
This documentation is part of the Using with Python guide. View the full guide here: How to send logs from Python to Graylog.
👋 Welcome to Stackhero documentation
Stackhero provides a fully managed Graylog cloud solution designed for speed and simplicity. You can:
- Rely on an unlimited, dedicated SMTP email server included with your service.
- Apply updates effortlessly with a single click, with no manual intervention needed.
- Use a custom domain name secured by HTTPS (for example, https://logs.your-company.com), giving your team secure, direct access.
- Experience strong performance and security on a private, dedicated infrastructure with no shared resources or noisy neighbors.
Focus on your data, not your tooling: you can get started with Stackhero's Graylog cloud hosting solution in just a few minutes.
While the previous examples use TLS encryption, they do not perform certificate validation. 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 like this:
handler = graypy.GELFTLSHandler('<XXXXXX>.stackhero-network.com', 12201, validate=True, ca_certs='/etc/ssl/certs/ca-certificates.crt')
Be sure the file /etc/ssl/certs/ca-certificates.crt exists on your system:
- On Ubuntu/Debian, you can install it using
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.