diff --git a/content/en/dashboards/querying/_index.md b/content/en/dashboards/querying/_index.md index 2f805a61bb2..a171665acf8 100644 --- a/content/en/dashboards/querying/_index.md +++ b/content/en/dashboards/querying/_index.md @@ -150,15 +150,16 @@ Datadog also supports the ability to graph your metrics, logs, traces, and other To graph metrics separately, use the comma (`,`). For example, `a, b, c`. -**Note**: Queries using commas are only supported in visualizations, they do not work on monitors. Use [boolean operators][15] or arithmetic operations to combine multiple metrics in a monitor. +**Note**: Queries using commas are only supported in visualizations; they do not work on monitors. Use [boolean operators][15] or arithmetic operations to combine multiple metrics in a monitor. -#### Metric arithmetic using an integer +{{% collapse-content title="Metric arithmetic using an integer" level="h4" %}} -Modify the displayed value of a metric on a graph by performing an arithmetic operation. For example, to visualize the double of a specific metric, click the {{< ui >}}Advanced...{{< /ui >}} link in the graph editor. Then enter your arithmetic in the `Formula` box, in this case: `a * 2`: +Modify the displayed value of a metric on a graph by performing an arithmetic operation. For example, to visualize the double of a specific metric, click the {{< ui >}}Advanced...{{< /ui >}} link in the graph editor. Then enter your arithmetic in the `Formula` box; in this case: `a * 2`: {{< img src="dashboards/querying/arithmetic_4.png" alt="Formula example - multiply" style="width:75%;" >}} +{{% /collapse-content %}} -#### Arithmetic between two metrics +{{% collapse-content title="Arithmetic between two metrics" level="h4" %}} Visualize the percentage of a metric by dividing one metric over another, for example: @@ -181,12 +182,13 @@ status:error / status:info {{< img src="dashboards/querying/arithmetic_6.png" alt="Formula example - logs ratio" style="width:75%;" >}} **Note**: Formulas are not lettered. Arithmetic cannot be done between formulas. +{{% /collapse-content %}} #### Hide a query from the visualization When a widget has multiple queries and a formula, you can hide individual queries so only the formula result appears on the graph. Click the query's letter label to toggle its visibility on the graph. A blue label indicates the query is displayed; a grey label indicates it is hidden. The hidden query is still used in the formula calculation. -#### Minimum or Maximum between two queries +{{% collapse-content title="Minimum or Maximum between two queries" level="h4" %}} Use `minimum()` and `maximum()` to compare two queries point by point and return the lower or higher value at each timestamp. @@ -207,6 +209,19 @@ minimum(status:error, status:warn) ``` {{< img src="dashboards/querying/minmax_logs_platform_example.png" alt="Formula example for 'minimum' showing the lower value between two log queries" style="width:75%;" >}} +{{% /collapse-content %}} + +{{% collapse-content title="time() function" level="h4" %}} + +The `time()` function returns the current Unix time in seconds as a timeseries. Use it in formulas to compare a metric's timestamp against the present, which helps monitor data freshness or calculate time until an expiration. + +For example, to calculate the time elapsed in seconds since the last reported backup, you can use `time()` to find the difference between the present and the timestamp of the backup metric. + +```text +time() - max:backup.last_completed_timestamp{*} +``` + +{{% /collapse-content %}} ### Create an alias diff --git a/content/en/security/application_security/setup/java/aws-fargate.md b/content/en/security/application_security/setup/java/aws-fargate.md index 65c0f61b7c2..7a1d8fe99d1 100644 --- a/content/en/security/application_security/setup/java/aws-fargate.md +++ b/content/en/security/application_security/setup/java/aws-fargate.md @@ -214,7 +214,7 @@ aws ecs register-task-definition --cli-input-json file://task-definition.json aws ecs run-task --cluster your-cluster --task-definition your-task-definition ``` -{{% app_and_api_protection_verify_setup %}} +{{% aap/aap_and_api_protection_verify_setup %}} ## Troubleshooting @@ -227,4 +227,3 @@ If you encounter issues while setting up App and API Protection for your Java ap [1]: /security/application_security/setup/java/compatibility [2]: /security/application_security/setup/java/troubleshooting - diff --git a/content/en/security/application_security/setup/java/docker.md b/content/en/security/application_security/setup/java/docker.md index 72641a1a9d4..cb982fb3d35 100644 --- a/content/en/security/application_security/setup/java/docker.md +++ b/content/en/security/application_security/setup/java/docker.md @@ -119,7 +119,7 @@ docker run -d \ your-java-app-image ``` -{{% app_and_api_protection_verify_setup %}} +{{% aap/aap_and_api_protection_verify_setup %}} ## Troubleshooting diff --git a/content/en/security/application_security/setup/java/kubernetes.md b/content/en/security/application_security/setup/java/kubernetes.md index 85943718a8d..d777e6ba773 100644 --- a/content/en/security/application_security/setup/java/kubernetes.md +++ b/content/en/security/application_security/setup/java/kubernetes.md @@ -192,7 +192,7 @@ kubectl apply -f your-deployment.yaml ``` -{{% app_and_api_protection_verify_setup %}} +{{% aap/aap_and_api_protection_verify_setup %}} ## Troubleshooting diff --git a/content/en/security/application_security/setup/java/linux.md b/content/en/security/application_security/setup/java/linux.md index c3e0e1e06ef..23de94b1bdb 100644 --- a/content/en/security/application_security/setup/java/linux.md +++ b/content/en/security/application_security/setup/java/linux.md @@ -104,7 +104,7 @@ java -javaagent:/path/to/dd-java-agent.jar -jar path/to/app.jar Start your Java application with above settings. -{{% app_and_api_protection_verify_setup %}} +{{% aap/aap_and_api_protection_verify_setup %}} ## Troubleshooting diff --git a/content/en/security/application_security/setup/java/macos.md b/content/en/security/application_security/setup/java/macos.md index c08ceb98b80..87c023a5f8e 100644 --- a/content/en/security/application_security/setup/java/macos.md +++ b/content/en/security/application_security/setup/java/macos.md @@ -100,7 +100,7 @@ java -javaagent:/path/to/dd-java-agent.jar -jar path/to/app.jar ## 3. Run your application Start your Java application with the configured settings. -{{% app_and_api_protection_verify_setup %}} +{{% aap/aap_and_api_protection_verify_setup %}} ## Troubleshooting diff --git a/content/en/security/application_security/setup/java/windows.md b/content/en/security/application_security/setup/java/windows.md index 93cb8f1494f..1050aafb9c5 100644 --- a/content/en/security/application_security/setup/java/windows.md +++ b/content/en/security/application_security/setup/java/windows.md @@ -100,7 +100,7 @@ java -javaagent:path\to\dd-java-agent.jar -jar path\to\app.jar Start your Java application with the configured settings. -{{% app_and_api_protection_verify_setup %}} +{{% aap/aap_and_api_protection_verify_setup %}} ## Troubleshooting diff --git a/content/en/security/application_security/setup/php/docker.md b/content/en/security/application_security/setup/php/docker.md index 58f5027fa04..00832cd52fe 100644 --- a/content/en/security/application_security/setup/php/docker.md +++ b/content/en/security/application_security/setup/php/docker.md @@ -86,7 +86,7 @@ docker run -d \ your-php-app-image ``` -{{% app_and_api_protection_verify_setup %}} +{{% aap/aap_and_api_protection_verify_setup %}} ## Troubleshooting diff --git a/content/en/security/application_security/setup/php/kubernetes.md b/content/en/security/application_security/setup/php/kubernetes.md index 2c9f4e3efa9..7db4b5cb991 100644 --- a/content/en/security/application_security/setup/php/kubernetes.md +++ b/content/en/security/application_security/setup/php/kubernetes.md @@ -110,7 +110,7 @@ Apply your updated deployment: kubectl apply -f your-deployment.yaml ``` -{{% app_and_api_protection_verify_setup %}} +{{% aap/aap_and_api_protection_verify_setup %}} ## Troubleshooting diff --git a/content/en/security/application_security/setup/php/linux.md b/content/en/security/application_security/setup/php/linux.md index a51c639eba7..45d6336fcc5 100644 --- a/content/en/security/application_security/setup/php/linux.md +++ b/content/en/security/application_security/setup/php/linux.md @@ -77,7 +77,7 @@ export DD_ENV= Start your PHP application with the settings described above. -{{% app_and_api_protection_verify_setup %}} +{{% aap/aap_and_api_protection_verify_setup %}} ## Troubleshooting diff --git a/content/en/security/application_security/setup/python/aws-fargate.md b/content/en/security/application_security/setup/python/aws-fargate.md index 8bb64c37b96..b4b9b15c08d 100644 --- a/content/en/security/application_security/setup/python/aws-fargate.md +++ b/content/en/security/application_security/setup/python/aws-fargate.md @@ -155,7 +155,7 @@ aws ecs register-task-definition --cli-input-json file://task-definition.json aws ecs run-task --cluster your-cluster --task-definition your-task-definition ``` -{{% app_and_api_protection_verify_setup %}} +{{% aap/aap_and_api_protection_verify_setup %}} ## Troubleshooting diff --git a/content/en/security/application_security/setup/python/docker.md b/content/en/security/application_security/setup/python/docker.md index 6581e03def6..39f5305fccd 100644 --- a/content/en/security/application_security/setup/python/docker.md +++ b/content/en/security/application_security/setup/python/docker.md @@ -89,7 +89,7 @@ docker run -d \ your-python-app-image ``` -{{% app_and_api_protection_verify_setup %}} +{{% aap/aap_and_api_protection_verify_setup %}} ## Troubleshooting diff --git a/content/en/security/application_security/setup/python/kubernetes.md b/content/en/security/application_security/setup/python/kubernetes.md index 41de466b56e..060ef39594b 100644 --- a/content/en/security/application_security/setup/python/kubernetes.md +++ b/content/en/security/application_security/setup/python/kubernetes.md @@ -111,7 +111,7 @@ Apply your updated deployment: kubectl apply -f your-deployment.yaml ``` -{{% app_and_api_protection_verify_setup %}} +{{% aap/aap_and_api_protection_verify_setup %}} ## Troubleshooting diff --git a/content/en/security/application_security/setup/python/linux.md b/content/en/security/application_security/setup/python/linux.md index 89e842afc7f..c8a6b6ff242 100644 --- a/content/en/security/application_security/setup/python/linux.md +++ b/content/en/security/application_security/setup/python/linux.md @@ -80,7 +80,7 @@ ddtrace-run python app.py Start your Python application with the settings described above. -{{% app_and_api_protection_verify_setup %}} +{{% aap/aap_and_api_protection_verify_setup %}} ## Troubleshooting diff --git a/content/en/security/application_security/setup/python/macos.md b/content/en/security/application_security/setup/python/macos.md index e6592553dcc..27edc17444b 100644 --- a/content/en/security/application_security/setup/python/macos.md +++ b/content/en/security/application_security/setup/python/macos.md @@ -78,7 +78,7 @@ ddtrace-run python app.py Start your Python application with the configured settings. -{{% app_and_api_protection_verify_setup %}} +{{% aap/aap_and_api_protection_verify_setup %}} ## Troubleshooting diff --git a/content/en/security/application_security/setup/python/windows.md b/content/en/security/application_security/setup/python/windows.md index 5a09b54054d..abd9432770e 100644 --- a/content/en/security/application_security/setup/python/windows.md +++ b/content/en/security/application_security/setup/python/windows.md @@ -75,7 +75,7 @@ ddtrace-run python app.py Start your Python application with the configured settings. -{{% app_and_api_protection_verify_setup %}} +{{% aap/aap_and_api_protection_verify_setup %}} ## Troubleshooting