Skip to main content

Configure Automatic Certificate Renewal

IDIAL includes a built-in scheduler that periodically scans the inventory and automatically renews certificates as soon as their remaining validity falls below a configurable threshold. This guide describes how to activate, configure, and monitor the scheduler.

note

The scheduler is inactive after installation. It must be explicitly activated via the API. The configuration is stored persistently and survives a container restart.

Prerequisites

Step 1 — Check Current Scheduler Status

First, check the current state of the scheduler:

curl -s \
-H "X-API-Key: <api-key>" \
https://<idial-host>:5000/systeminfo

The response contains all scheduler-related fields:

{
"software": "IDIAL",
"version": "1.x.x",
"gds_push_scheduler_status": "inactive",
"gds_push_scheduler_active": false,
"gds_push_scheduler_renewal_days": 30,
"gds_push_scheduler_scan_interval_sec": 60,
"monitor_scheduler_status": "inactive",
"monitor_scheduler_active": false,
"monitor_scheduler_scan_interval_sec": 600,
"show_inactive_devices": false
}
FieldDescription
gds_push_scheduler_status"active" or "inactive"
gds_push_scheduler_activeActivation flag
gds_push_scheduler_renewal_daysGlobal renewal threshold in days
gds_push_scheduler_scan_interval_secScan interval in seconds
show_inactive_devicesWhether inactive devices are included in scans

Step 2 — Activate and Configure the Scheduler

The scheduler is configured via POST /systeminfo. All fields are optional — only the fields sent will be changed.

curl -s -X POST \
-H "X-API-Key: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"gds_push_scheduler_active": true,
"gds_push_scheduler_renewal_days": 30,
"gds_push_scheduler_scan_interval_sec": 60
}' \
https://<idial-host>:5000/systeminfo
ParameterTypeDefaultDescription
gds_push_scheduler_activebooleanfalseEnable/disable the scheduler
gds_push_scheduler_renewal_daysinteger ≥ 030Renew certificate when remaining validity ≤ this value (days)
gds_push_scheduler_scan_interval_secinteger ≥ 160How often the inventory is scanned (seconds)
show_inactive_devicesbooleanfalseInclude inactive devices in the scan
tip

A renewal_days value of 30 means IDIAL renews the certificate when fewer than 30 days of validity remain. Choose a value that leaves enough buffer for failures — at least 14 days is recommended if maintenance windows are weekly.

warning

Changes to gds_push_scheduler_renewal_days reset the internal deduplication state. This means: the next scan immediately triggers a renewal check for all affected devices.

Step 3 — Set a Device-Specific Renewal Threshold (Optional)

Individual devices can have a different renewal threshold that overrides the global renewal_days value.

curl -s -X PATCH \
-H "X-API-Key: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"renewal_days": 60
}' \
https://<idial-host>:5000/gds/inventory/<device-id>

Set renewal_days to null to return to the global value:

curl -s -X PATCH \
-H "X-API-Key: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"renewal_days": null
}' \
https://<idial-host>:5000/gds/inventory/<device-id>

Step 4 — Monitor the Renewal Run

After activation, the scheduler runs in the background. Check the status again to confirm it is active:

curl -s \
-H "X-API-Key: <api-key>" \
https://<idial-host>:5000/systeminfo

Expected response after successful activation:

{
"gds_push_scheduler_status": "active",
"gds_push_scheduler_active": true,
"gds_push_scheduler_renewal_days": 30,
"gds_push_scheduler_scan_interval_sec": 60
}
note

The scheduler has no built-in retry mechanism. If a renewal fails, the error is logged and the scheduler continues with the next device. The renewal attempt is retried in the next scan cycle as long as the certificate state has not changed.

Summary

GET /systeminfo → Check current scheduler status
POST /systeminfo → Activate/configure the scheduler
PATCH /gds/inventory/{id} → Set device-specific renewal_days
GET /systeminfo → Confirm activation

Next Steps

Troubleshooting

SymptomPossible CauseSolution
gds_push_scheduler_status stays "inactive"gds_push_scheduler_active was not set to trueSend POST /systeminfo with "gds_push_scheduler_active": true
Certificates not renewed even though threshold is reachedDevice has no assigned PKI endpointCheck and assign PKI endpoint in the inventory entry
Renewal fails, next scan does not retryDeduplication state prevents retryBriefly change renewal_days and reset it — this clears the state
Device is not scannedshow_inactive_devices: false and device is inactiveActivate device or set show_inactive_devices: true