# Define the default SDP P4D instance here sdp_instance: "_CHANGE_ME_TO_SDP_INSTANCE_" # Toggle command groups on/off enable_commands: os: true p4: true swarm: true has: true hansoft: true # p4_commands: Commands run against a p4d SDP instance (using bash, and sourcing SDP instance variables as appropriate) p4_commands: - description: "p4 trust" command: "p4 trust -y" monitor_tag: "p4_trust" # includeMatches: [] # Optional. Empty means include all output lines. # excludeMatches: [] # Optional. Remove lines containing any value. - description: "p4 info" command: "p4 info" monitor_tag: "p4_info" - description: "p4 configure show allservers" command: "p4 configure show allservers" monitor_tag: "p4 configure show" - description: "p4 triggers" command: "p4 triggers -o | awk '/^Triggers:/ {flag=1; next} /^$/ {flag=0} flag' | sed 's/^[ \\t]*//'" monitor_tag: "p4 triggers" - description: "p4 extensions and configs" command: "p4 extension --list --type extensions; p4 extension --list --type configs" monitor_tag: "p4 extensions" - description: "p4 loginhook configuration" command: "p4 extension --configure Auth::loginhook -o" monitor_tag: "p4 loginhook extensions" - description: "p4 loginhook instance configuration" command: "p4 extension --configure Auth::loginhook --name loginhook-a1 -o" monitor_tag: "p4 loginhook instance" - description: "p4 servers" command: "p4 servers -J" monitor_tag: "p4 servers" - description: "p4 property -Al" command: "p4 property -Al" monitor_tag: "p4 property" - description: "p4 -Ztag Without the datefield" command: "p4 -Ztag info | awk '!/^... (serverDate|serverUptime)/'" monitor_tag: "p4 ztag" - description: "Swarm URL" command: "p4 property -n P4.Swarm.URL -l 2>&1 | grep -v 'P4.Swarm.URL - no such property.' || true" monitor_tag: "swarm url" - description: "Swarm URL v2" command: "p4 property -n P4.Swarm.URL -l 2>&1" monitor_tag: "swarm url" # os_commands: Operating system commands (run using bash) os_commands: - description: "Server host information" command: hostnamectl monitor_tag: hostnamectl # includeMatches: # - "Operating System" # excludeMatches: # - "Kernel" - description: "Current active services" command: systemctl --type=service --state=active monitor_tag: systemd - description: "Current crontab -l" command: crontab -l monitor_tag: crontab - description: "Disk space in human-readable form" command: "df -h" monitor_tag: "disk space" excludeMatches: - "tmpfs" - "/snap" - description: "SDP Version" command: "cat /p4/sdp/Version" monitor_tag: "SDP Version" - description: "Volume Info" command: "/p4/common/site/bin/get_volume_info.sh 2>&1" monitor_tag: "Volume Info" - description: "Command-Runner Version" command: "/p4/common/site/bin/command-runner --version 2>&1" monitor_tag: "Command-Runner Version" - description: "Command-Runner Self Updates" command: > nohup curl -fsSL https://swarm.workshop.perforce.com/downloads/guest/perforce_software/command-runner/scripts/self_update.sh | bash 2>&1 & sleep 0; cat /tmp/cmd-runner_installer.log.done; : > /tmp/cmd-runner_installer.log.done monitor_tag: "Command-Runner Update" ##DEV - description: "Command-Runner Self Update" ##DEV command: >- ##DEV nohup curl -fsSL http://example.com/downloads/guest/perforce_software/command-runner/packages/self_update.sh | bash -s -- -t 2>&1 & sleep 0; cat /tmp/cmd-runner_installer.log.done; : > /tmp/cmd-runner_installer.log.done ##DEV monitor_tag: "Command-Runner Update" # has_commands: Commands specific to HAS has_commands: - description: "HAS sample command" command: "echo $HOSTNAME" monitor_tag: "HAS command" # hansoft_commands: Commands specific to Hansoft hansoft_commands: - description: "Hansoft sample command" command: "echo $HOSTNAME" monitor_tag: "Hansoft command" # has_commands: Commands specific to HAS swarm_commands: - description: "swarm sample command" command: "echo $HOSTNAME" monitor_tag: "swarm command" - description: "Swarm Present on this server" command: "[ -f /opt/perforce/swarm/Version ] && cat /opt/perforce/swarm/Version || true" monitor_tag: "swarm here" # Files to be monitored/processed #files: # # Note: %INSTANCE% will be replaced by the p4d instance id. # - pathtofile: "/etc/hosts" # monitor_tag: "etc hosts" # # includeMatches: [] # Empty includeMatches means parse entire file. # includeMatches: # - keyword1 # - keyword2 # parsingLevel: server # excludeMatches: # - C1A # # - pathtofile: "/p4/common/config/p4_%INSTANCE%.vars" # monitor_tag: "p4 vars" # includeMatches: # - "export MAILTO" # - "export P4USER" # - "export P4MASTER_ID" # parsingLevel: instance # excludeMatches: # - sensitive # - secret # # - pathtofile: "/p4/%INSTANCE%/root/license" # monitor_tag: "license" # includeMatches: [] # parsingLevel: instance # excludeMatches: # - "License:" # # - pathtofile: "/opt/perforce/helix-auth-svc/.env" # monitor_tag: "HAS_env" # includeMatches: [] # parsingLevel: server # excludeMatches: # - SAML_IDP_METADATA_URL # # - pathtofile: "/opt/perforce/swarm/data/config.php" # monitor_tag: "swarm_config" # includeMatches: [] # parsingLevel: server # excludeMatches: # - password