Skip to main content

Windows File Share (SMB/CIFS)

Checks the contents of a Windows / CIFS file share for size, age, and count.

See Folder for a full description.

smb-folder-check.yaml
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: smb-pass
spec:
schedule: "@every 5m"
folder:
# Check for any backup not older than 7 days and min size 25 bytes
- path: \\windows-server\sharename\folder
smbConnection:
username:
valueFrom:
secretKeyRef:
name: smb-credentials
key: USERNAME
password:
valueFrom:
secretKeyRef:
name: ssmb-credentials
key: PASSWORD
filter:
regex: "(.*)backup.zip$"
maxAge: 7d
minSize: 25b
FieldDescriptionSchemeRequired
nameName of the checkstringYes
pathA path to a shared Windows folder, such as smb://host/folder or a UNC pathstringYes
smbConnectionSMB connection detailsSMB
*All other fields available in the folder checkFolder

SMB​

FieldDescriptionScheme
connection

The connection url to use, mutually exclusive with host, share, and credentials

Connection

domain

Windows Domain

host

The SMB host

string

password

EnvVar

port

integer

username

EnvVar