This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time,paramiko | |
| from checks import AgentCheck | |
| class remoteSSHCheck(AgentCheck): | |
| def check(self, instance): | |
| client = paramiko.SSHClient() | |
| #client.load_system_host_keys() | |
| #client.connect(instance['host']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "time" | |
| "fmt" | |
| "strconv" | |
| "net/http" | |
| "math" | |
| "math/rand" | |
| "io/ioutil" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from checks import AgentCheck | |
| from datadog_checks.utils.subprocess_output import get_subprocess_output | |
| class GetProcessByUser(AgentCheck): | |
| def check(self, instance): | |
| processes, err, retcode = get_subprocess_output(["powershell.exe", "Get-Process -IncludeUserName | where {$_.Username -notlike \"*NT AUTHORITY*\"} | where {$_.Username -notlike \"*SYSTEM*\"} | where {$_.Username -ne $null} | where {$_.Username -notlike \"*Window Manager*\"} | Select ProcessName,Username,CPU,PM,VM"], self.log, raise_on_empty_output=True) | |
| # ProcessName : Code | |
| # UserName : WIN-5OU1M45KDAQ\vagrant | |
| # CPU : 14.28125 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kind: ConfigMap | |
| apiVersion: v1 | |
| metadata: | |
| name: dd-agent-config | |
| namespace: myproject | |
| data: | |
| kubernetes.yaml: |- | |
| init_config: | |
| min_collection_interval: 300 | |
| instances: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: extensions/v1beta1 | |
| kind: DaemonSet | |
| metadata: | |
| name: datadog-agent | |
| spec: | |
| template: | |
| metadata: | |
| labels: | |
| app: datadog-agent | |
| name: datadog-agent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kind: ConfigMap | |
| apiVersion: v1 | |
| metadata: | |
| name: datadog-config | |
| namespace: default | |
| data: | |
| tomcat-autoconf.yaml: |- | |
| ad_identifiers: | |
| - tomcat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: extensions/v1beta1 | |
| kind: DaemonSet | |
| metadata: | |
| name: dd-agent | |
| spec: | |
| selector: | |
| matchLabels: | |
| name: dd-agent | |
| template: | |
| metadata: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: extensions/v1beta1 | |
| kind: DaemonSet | |
| metadata: | |
| name: datadog-agent | |
| spec: | |
| selector: | |
| matchLabels: | |
| name: datadog-agent | |
| template: | |
| metadata: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kind: ClusterRole | |
| apiVersion: rbac.authorization.k8s.io/v1beta1 | |
| metadata: | |
| name: datadog | |
| rules: | |
| - nonResourceURLs: | |
| - "/version" # Used to get apiserver version metadata | |
| - "/healthz" # Healthcheck | |
| verbs: ["get"] | |
| - apiGroups: [""] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kind: ConfigMap | |
| apiVersion: v1 | |
| metadata: | |
| name: dd-agent-config | |
| namespace: myproject | |
| data: | |
| kubernetes: |- | |
| init_config: | |
| instances: | |
| port: 4194 |