View GOV.UK logs in Logit
GOV.UK sends application logs and origin HTTP request logs to Logit, a software-as-a-service log storage and retrieval system based on the Elasticsearch, Logstash, Kibana stack.
Fastly CDN logs are not stored in Logit. See Query CDN logs.
Access Logit
Log into Logit
You can log into Logit directly via Google Workspace single-sign-on.
Alternatively, you can open Logit from the Google Workspace apps menu in Gmail, Calendar, and Drive. Click the 3x3-grid-of-dots icon next to the GDS logo in the top-right corner, scroll all the way to the bottom of the list of icons that appears, then choose Logit.
Once you are logged in, you should see the Logit Dashboard page.
Launch Kibana
From the Logit Dashboard page, choose Launch Kibana for the appropriate stack.
Each environment (production, staging, integration) has its own ELK stack in
Logit named GOV.UK <environment> EKS
.
Alternative login method
- Go to https://dashboard.logit.io/sign-in.
- Enter your
<username>@digital.cabinet-office.gov.uk
email address. The password box should disappear when you do this. - Press Return.
- If you are signed into multiple Google accounts, you will be prompted to
choose one. Choose your
digital.cabinet-office.gov.uk
account. - If you are accessing Logit for the first time, you may need to allow Logit to connect with your Google Workspace account if prompted.
- You should be redirected to
dashboard.logit.io
and see a list of available stacks.
If you don’t have access to Logit
Make sure you have followed the instructions precisely.
If you chose Sign in with Google (or any of the other Sign in with links) on the Logit Sign into your account page, you may be logged in but with no stacks visible. Sign out using the link at the bottom-left corner of the page and try again.
Your tech lead should have already set up your logs access when you joined your team. If you are unable to view logs in Logit, get in touch with your tech lead or a member of GOV.UK Senior Tech.
Useful Kibana queries
Administration guide
For an overview of GOV.UK’s logging architecture, see How logging works on GOV.UK.
If Logit is down
Check the Logit status page to see if there is a known issue.
Check that you can sign into other third-party services via Google Workspace SSO, for example Terraform Cloud. If not then the problem is likely with your account or GDS’s Google Workspace setup. Contact the IT helpdesk if you suspect this.
Try from a different network (for example by tethering your work mobile phone to your laptop, or by disconnecting from the office VPN) to make sure it’s not a local network issue.
Have someone else check that it’s down for them too, in case the problem is specific to your user account. Your tech lead (during office hours) or secondary on call (if you’re on call out of hours) can help with this.
If you are sure there is a Logit outage, contact Logit telephone support (access restricted to GDS). If unsure, ask your tech lead or a member of GOV.UK Senior Tech.
- You will be prompted to enter the PIN and leave a voicemail message.
- Mention your name, that you’re calling from GDS, a brief description of the problem and a contact number for them to reach you.
- This will page someone at Logit and they should call you back within half an hour.
If new logs stop appearing altogether
Logs should normally become available to query in Kibana within a minute or two of being written.
Find out when logs stopped appearing. Run an empty query in Kibana Explore with the time range set to “last 7 days” and check the bar graph of message count per time window.
On the source Kubernetes cluster, make sure the filebeat daemonset is healthy and look for errors in its logs. Platform Engineering team can help you with this.
k -n cluster-services describe ds/filebeat-filebeat
k -n cluster-services logs ds/filebeat-filebeat
Check for ingestion errors in Logstash:
- From the Logit dashboard, choose Settings for the affected stack.
- Choose Diagnostic Logs from the left-hand menu.
If you don’t have the Settings option, ask your tech lead or someone in GOV.UK Senior Tech for help.
If there seems to be no recent data in Kibana when there really should be, you can try restarting the Logstash instance:
- From the Logit dashboard, choose Settings for the affected stack.
- Select Logstash Filters in the left hand menu.
- Under Danger Zone, press Restart Logstash.
Grant logs access to new users
If you cannot see the user in the user list, they need to first attempt to login via SSO to Logit. Only once they have attempted to login to Logit will their account be visible for you to then assign them to a team.
- Go to the main “Dashboard”
- Click “Manage Teams”, then “Team Settings” and then click the appropriate team.
- Scroll down until you see a list of users and for the particular user give them “Member” access
- Click “Apply Changes”
Update Logstash configuration
At present there is no automated way to configure Logstash configuration.
- Click the “Settings” button next to the stack you wish to configure.
- Go to “Logstash Filters”
- Amend the configuration
- Click “Validate”
- If correctly validated, click “Apply”
We store our configuration in the govuk-infrastructure repository. Any changes to the configuration should be stored in here, and they should be consistent across stacks.
Retention period
- Production: 14 days
- Staging: 7 days
- Integration: 7 days
The retention window for an environment is configurable under the Settings page for the corresponding Logit stack, for users with the Stack Editor permission.