• /
  • EnglishEspañolFrançais日本語한국어Português
  • Log inStart now

Manage certificate check monitors

New Relic allows you use NerdGraph to create certificate check monitors. Certificate check monitors track SSL certificate expiration dates and notify you when certificates are about to expire. This tutorial provides examples of how to use the NerdGraph API to automate the creation of certificate check monitors.

Create a certificate check monitor

You can create a certificate check monitor using the syntheticsCreateCertCheckMonitor mutation. This mutation allows you to set up monitoring for SSL certificate expiration on any domain.

Input parameters

Parameter

Data Type

Is it Required?

Description

accountId

Integer

Yes

Your New Relic account ID where the monitor will be created.

monitor.domain

String

Yes

The domain to monitor for certificate expiration (e.g., example.com).

monitor.locations.public

Array

Yes

Array of public location identifiers where the monitor will run checks (e.g., ["US_EAST_1", "US_WEST_1"]).

monitor.name

String

Yes

The display name for your certificate check monitor.

monitor.numberDaysToFailBeforeCertExpires

Integer

Yes

Number of days before certificate expiration to trigger a failure. For example, setting this to 30 means the monitor will fail when the certificate has 30 or fewer days until expiration.

monitor.period

Enum

Yes

How often the monitor runs. Options: EVERY_MINUTE, EVERY_5_MINUTES, EVERY_10_MINUTES, EVERY_15_MINUTES, EVERY_30_MINUTES, EVERY_HOUR, EVERY_6_HOURS, EVERY_12_HOURS, EVERY_DAY.

monitor.status

Enum

Yes

The monitor status. Options: ENABLED (monitor is active and performing checks), DISABLED (monitor is inactive).

monitor.apdexTarget

Float

No

The monitor's Apdex target in seconds, used to populate SLA reports. Defaults to 7.0 seconds.

Sample request

mutation {
syntheticsCreateCertCheckMonitor(
accountId: ACCOUNT_ID
monitor: {
domain: "DOMAIN"
locations: { public: ["LOCATION_1", "LOCATION_2"] }
name: "YOUR_MONITOR_NAME"
numberDaysToFailBeforeCertExpires: DAYS_UNTIL_EXPIRATION
period: PERIOD
status: STATUS
apdexTarget: APDEX_TARGET
}
) {
errors {
description
type
}
}
}

Sample response

A successful response returns null for errors:

{
"data": {
"syntheticsCreateCertCheckMonitor": {
"errors": null
}
}
}

If there are any issues creating the monitor, the errors array will contain objects with description and type fields explaining what went wrong.

Update a certificate check monitor

You can update an existing certificate check monitor using the syntheticsUpdateCertCheckMonitor mutation. This allows you to modify the configuration of a certificate check monitor that has already been created.

Input parameters

Parameter

Data Type

Is it Required?

Description

guid

String

Yes

The unique entity GUID of the monitor you want to update.

monitor.domain

String

No

The domain to monitor for certificate expiration (e.g., example.com).

monitor.locations.public

Array

No

Array of public location identifiers where the monitor will run checks (e.g., ["US_EAST_1", "US_WEST_1"]).

monitor.name

String

No

The updated display name for your certificate check monitor.

monitor.numberDaysToFailBeforeCertExpires

Integer

No

Number of days before certificate expiration to trigger a failure.

monitor.period

Enum

No

How often the monitor runs. Options: EVERY_MINUTE, EVERY_5_MINUTES, EVERY_10_MINUTES, EVERY_15_MINUTES, EVERY_30_MINUTES, EVERY_HOUR, EVERY_6_HOURS, EVERY_12_HOURS, EVERY_DAY.

monitor.status

Enum

No

The monitor status. Options: ENABLED (monitor is active and performing checks), DISABLED (monitor is inactive).

monitor.apdexTarget

Float

No

The monitor's Apdex target in seconds, used to populate SLA reports. Defaults to 7.0 seconds.

Sample request

mutation {
syntheticsUpdateCertCheckMonitor(
guid: ENTITY_GUID
monitor: {
domain: "DOMAIN"
locations: { public: ["LOCATION_1", "LOCATION_2"] }
name: "YOUR_MONITOR_NAME"
numberDaysToFailBeforeCertExpires: DAYS_UNTIL_EXPIRATION
period: PERIOD
status: STATUS
apdexTarget: APDEX_TARGET
}
) {
errors {
description
type
}
}
}

Sample response

A successful response returns null for errors:

{
"data": {
"syntheticsUpdateCertCheckMonitor": {
"errors": null
}
}
}

If there are any issues updating the monitor, the errors array will contain objects with description and type fields explaining what went wrong.

Delete a certificate check monitor

When a certificate check monitor is no longer needed, you can permanently remove it using the syntheticsDeleteMonitor mutation.

To delete a monitor, refer to the Delete Synthetic monitor section.

Copyright © 2025 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.