Goal
Check Windows Event Viewer for events tied to Octopus Server and Tentacle services (crashes, memory, disk, network, SQL, and authentication failures) and, where possible, match them to the Octopus logs. Not every event has a matching log entry. This applies to any Octopus Server or Tentacle running as a Windows service.
Prerequisites
- Local administrator access to each machine you need to check (see Decide which machine to check).
- The Manage auditing and security log right, to read the Security log.
- The Octopus home directory. The default is
C:\Octopus, with logs in itsLogsfolder.
Steps
Know where to look
Octopus writes its own detail to text logs (OctopusServer.txt, OctopusTentacle.txt), not to Event Viewer. Event Viewer only shows what Windows records about the services. Use both.
Find the service names
In an elevated PowerShell prompt:
Get-CimInstance Win32_Service |
Where-Object { $_.Name -match 'Octopus|Tentacle' -or $_.DisplayName -match 'Octopus|Tentacle' } |
Select-Object Name, DisplayName, State, ProcessId
This is a name-based search, so it can miss a service with an unusual name. Record both Name and DisplayName, because Service Control Manager messages can show either. Each Tentacle instance is its own service.
Decide which machine to check
Events are recorded on different machines, so check the right one. Some examples include:
- Service, memory, disk, and network events: the machine running the Octopus service.
- 4625 (failed logon): the computer where the logon was attempted.
- 4771 (Kerberos pre-auth failure): the domain controller.
- 4776 (credential validation): the computer authoritative for the credentials. That is a domain controller for domain accounts and the local computer for local accounts.
- 4740 (account lockout): the computer that owns the account (a domain controller for domain accounts).
- SQL login failures (18456): the database host. Start with the SQL Server error log. The Windows Application log on that host may also record it, depending on configuration.
Create the Custom Views
- Run
eventvwr.msc. - Right-click Custom Views and select Create Custom View....
- Set Logged to the period you need.
- Use the settings below, one view per row, and save each with a clear name.
| View | Levels / keywords | Log | Event sources | Event IDs |
|---|---|---|---|---|
| Service crashes | Critical, Error, Warning | System | Service Control Manager | 7000, 7009, 7031, 7034 |
| Memory and crashes | Critical, Error, Warning | System, Application | Resource-Exhaustion-Detector, Application Error, .NET Runtime | 2004, 1000, 1026 |
| Disk and network | Critical, Error, Warning | System | disk, Ntfs, storport, DNS Client Events, NETLOGON | (blank) |
| Authentication failures | Keywords: Audit Failure | Security | (blank) | 4625, 4771, 4776 |
| Account lockouts | Keywords: Audit Success | Security | (blank) | 4740 |
| SQL login failures | (any) | Application | MSSQLSERVER, or MSSQL$InstanceName | 18456 |
What the key events mean:
- 7034 / 7031: a service terminated unexpectedly (7031 also means a recovery action was configured).
- 7000 / 7009: a service failed to start or timed out starting.
- 2004: Windows reported low virtual memory and listed the top consumers.
-
1000 / 1026: a process crashed, or an unhandled .NET exception (such as
OutOfMemoryException) ended it. - 4625 / 4771 / 4776: failed logon, Kerberos pre-auth failure, credential validation.
- 4740: an account was locked out.
Open an event and confirm the service name matches one from the previous step, because the crash view also shows unrelated services.
Use the right keyword for each Security event
Audit events don't use the Critical, Error, or Warning levels, so filtering the Security log by level produces an empty view. Filter by keyword instead, and note that the keyword differs by event:
- 4625 and 4771: recorded as Audit Failure.
-
4776: recorded as both success and failure. Under Audit Failure the view shows only the failed validations. A query by ID alone returns both, so check the error code in each event (
0x0means success). - 4740: recorded as Audit Success. Filtering it by Audit Failure silently hides every lockout.
Check SQL permission errors in the Octopus log
Object-level errors such as "The SELECT permission was denied on the object..." typically surface in the Octopus Server log as exceptions, not in Event Viewer. Search the log for permission was denied. For login failures (18456), see the machine list above.
Correlate with the Octopus logs
- Note the event's Logged time on the General tab.
- Open the logs in your Octopus home directory (default
C:\Octopus\Logs). Rotated files carry numeric suffixes such asOctopusServer.0.txt. - Find lines within about a minute of the event. Confirm which time zone the log timestamps use first.
What to look for:
- Crash events: read the last lines before the service died. A log that simply stops fits an external kill, but it can't be told apart from an abrupt internal crash or a message that never reached disk.
-
Authentication failures: search for
invalid username,invalid password, orlogin failed. Octopus can log these at Info level, so don't limit the search to warnings and errors.
Not every event will line up with a log entry, and a missing match isn't a sign you did something wrong. Common reasons:
- Octopus never logged it, because the failure happened outside the Octopus process (a forced kill, a disk fault, a Windows logon attempt that never reached Octopus).
- The log line was rotated out, or sits in an older numbered file.
- The timestamps differ because of time zone or clock skew, so the line falls outside your one-minute window.
- The log level was too low to record it.
Treat a match as supporting evidence, not proof of cause. Several unrelated events can fall within the same minute, especially on a busy server. Treat the absence of a match as information too, since it often points to an external cause.
(Optional) Query from PowerShell
This is a starting query. It returns 7031 and 7034 events for all services, so check each event's details for your service name:
Get-WinEvent -FilterHashtable @{
LogName = 'System'
ProviderName = 'Service Control Manager'
Id = 7031, 7034
StartTime = (Get-Date).AddHours(-24)
}
For the Security log, run elevated, filter by Id, and omit Level. A query by ID returns both successes and failures for 4776. PowerShell can report "No events were found" as a non-terminating error. It means the query matched no events.
Verify
- Each Custom View appears under Custom Views and opens without errors.
- Where possible, confirm each view against events you already know happened, such as a past service restart or a known failed logon.
- Optionally, on a disposable test Tentacle only, end its process in Task Manager. A 7034 or 7031 event for that service should appear within seconds, depending on its recovery configuration. Don't do this on a production service.
- A failed Windows logon produces a 4625 event only if Audit Logon failure auditing is enabled, and only on the machine where the logon was attempted.
- A failed Octopus portal sign-in leaves a log line depending on your authentication method and logging configuration, so a missing line doesn't mean the check failed.
- If the Security view stays empty after a known failed logon, confirm you are running as an administrator and that the audit policy is enabled.
Related
- Octopus log files: where logs are written and how rotation works.
- Microsoft documentation for
Get-WinEventand itsFilterHashtablekeys: the filtering options used above.