Getting Started - Puppet-managed VMs
If your application runs on virtual machines managed by Puppet, you can use the pmodule_vector module to ship logs to our logging backend.
Request Access
Contact the Platon team on #platon (Slack) with:
- Tenant name: A name for your team or product
- EntraID group: The Microsoft Entra ID group that should have access
We will:
- Create your tenant and store credentials in Vault
- Set up your Grafana organization and data sources
Configure Puppet
Start by making sure the pmodule_vector module is configured by the node(s) you're trying to configure.
If pmodule_vector is already included and configured, you can skip this step.
You must make sure that the pmodule_vector is included, and make sure these parameters are set in hiera:
pmodule_vector::loki_credentials_vault_path: must be set to a Vault path containing the Loki credentials, that is accessible by the node (this requirespmodule_vaultto be bootstrapped with a token on the node)pmodule_vector::tenant_id: must be set to a default tenant ID for the node
Then add the pmodule_vector::file resource to your Puppet configuration:
pmodule_vector::file { 'myapp':
paths => ['/var/log/myapp/*.log'],
tenant_id => 'your-tenant-name',
}
Parameters
| Parameter | Description |
|---|---|
paths | Array of log file paths (supports wildcards) |
tenant_id | Your tenant name (provided by Platon) |
parse_as_json | Set to true if your logs are JSON formatted (optional) |
Multiple Log Sources
You can define multiple log sources:
pmodule_vector::file { 'myapp':
paths => ['/var/log/myapp/*.log'],
tenant_id => 'my-team',
}
pmodule_vector::file { 'nginx':
paths => ['/var/log/nginx/access.log', '/var/log/nginx/error.log'],
tenant_id => 'my-team',
}
What the Module Does
The pmodule_vector module:
- Installs Vector on your VM
- Configures Vector to read from the specified log files
- Retrieves credentials from Vault
- Ships logs to Loki with the correct tenant header
You don't need to manage authentication - the module handles it.
View Your Logs
After Puppet applies the configuration:
- Go to grafana.platon.sikt.no
- Log in with Feide
- Select your organization
- Go to Explore and select your Loki data source
Next Steps
- Querying Logs - Learn how to search and filter your logs
- LogQL Best Practices - Write efficient queries
- Alerting - Get notified when things go wrong