Send and verify a test metric
Reference information for sending and verifying a test metric with a Splunk Observability Cloud Ingest token.
Prerequisites
Send a test metric to confirm that the network path, realm-specific ingest endpoint, and Ingest token work before you configure agents or Collectors to send application telemetry.
This procedure validates an Ingest token. It does not validate the API token used by a Migration Tool destination connection.
Confirm that:
- You completed network connectivity validation.
- You created and stored an Ingest token in an approved secret manager.
- You recorded the destination realm and ingest endpoint.
- You can run the test from a host that uses the planned telemetry network path.
Send the test metric
The following example sends one gauge data point named test.migration.validation with a value of 42.
Make the Ingest token available to your command-line session as SPLUNK_INGEST_TOKEN using your organization’s approved secret-handling method.
Do not place the token value directly in a saved command or script.
Replace <realm> with the destination organization’s realm:
curl --request POST \
--header "Content-Type: application/json" \
--header "X-SF-TOKEN: ${SPLUNK_INGEST_TOKEN}" \
--data '{
"gauge": [
{
"metric": "test.migration.validation",
"value": 42,
"dimensions": {
"environment": "migration-test",
"source": "phase2-validation"
}
}
]
}' \
--write-out "
HTTP status: %{http_code}
" \
"https://ingest.<realm>.observability.splunkcloud.com/v2/datapoint"
A successful request returns HTTP status 200.
See Send metrics, traces, and events using Splunk Observability Cloud REST APIs for the supported request format and response codes.
Use the same metric name and stable dimension values for repeated tests.
Do not add timestamps, request identifiers, or other unbounded values as dimensions.
Verify the metric
After the request returns HTTP status 200:
- In Splunk Observability Cloud, verify your view of the destination organization.
- In the left navigation menu, select Metrics.
- If Metric Explorer opens, select the Metrics tab.
- Search for
test.migration.validation. - Select the metric and confirm that it has a recent data point with a value of
42. - Confirm that these dimensions appear:
environment:migration-testsource:phase2-validation
- Plot or open the metric to verify the data point visually.
See Search and explore data with the Metric Explorer. If your organization displays Metric Finder instead of Metric Explorer, see Search the Metric Finder and Metadata Catalog.
Repeat the test for each Ingest token and distinct telemetry egress path included in the migration wave.
Resolve test failures
| Result | Review |
|---|---|
|
HTTP |
Verify JSON validity and the presence of a metric name, type, and value. |
|
HTTP |
Verify the token’s active status, Ingest scope, destination-organization association, and correct realm. |
|
DNS, connection, or TLS error |
Return to Validate Network Connectivity and review the endpoint, firewall, proxy, DNS, and certificate configuration. |
|
HTTP |
Verify your view of the organization associated with the token, confirm the metric name and dimensions, remove conflicting Metric Finder filters, and refresh the search. |
Do not include the token value in troubleshooting output, tickets, screenshots, or migration records.
Validate the API token separately
A test metric does not validate an API token.
If the migration wave includes configuration artifacts, add the API token to Migration Tool destination connection and run the destination connection test. The connection test validates the destination endpoint, authentication, and required API permissions.
Record the result
For each test, record:
- Test date
- Source host or network zone
- Destination realm
- Ingest-token name, but not its value
- Metric name
- HTTP status
- Metric Finder verification result
- Any unresolved issue and its owner
Confirm readiness
Confirm that:
- [ ] Each required Ingest token returned HTTP status
200. - [ ] The test metric appeared in the intended destination organization.
- [ ] You found the expected value and dimensions.
- [ ] You tested each distinct telemetry egress path.
- [ ] Any required API token passed Migration Tool destination connection test.
- [ ] You did not record or expose any token value.