Hi
I'm currently running a dashboard called Homepage where i have a widget that checks for disk space and failed Tasks 24h back.
It calls the API like this where
The problem is that running tasks shows up as failed until they are done and if successfully completed they go away.
What i have seen when manually testing directly against the API is that running tasks has no status key at all.
Running job:
While other jobs have.
Other:
I have seen in my testing also that
Testing against this
I'm running the latest version 4.2.5.
There are no errors when the API call is run so nothing seems to be wrong in the API call itself.
Is this an intended behavior or a bug perhaps?
/Regards
Marcus
I'm currently running a dashboard called Homepage where i have a widget that checks for disk space and failed Tasks 24h back.
It calls the API like this where
since is set dynamically to check 24H back:
Code:
/api2/json/nodes/localhost/tasks?limit=100&errors=true&since=1787658006
The problem is that running tasks shows up as failed until they are done and if successfully completed they go away.
What i have seen when manually testing directly against the API is that running tasks has no status key at all.
Running job:
JSON:
{
"upid": "e304958304598:",
"node": "localhost",
"pid": 1337,
"pstart": 1710,
"starttime": 1787741689,
"worker_type": "verificationjob",
"worker_id": "mybackup01:v-07936a91-9de4",
"user": "xxx"
}
While other jobs have.
Other:
JSON:
{
"upid": "wpeoriweproiwerpoiu:",
"node": "localhost",
"pid": 440913,
"pstart": 823190969,
"starttime": 1745192750,
"worker_type": "aptupdate",
"worker_id": null,
"user": "xxx",
"endtime": 1745192750,
"status": "unknown"
}
{
"upid": "erpoti348907weriuy:",
"node": "localhost",
"pid": 1337,
"pstart": 1710,
"starttime": 1787742000,
"worker_type": "prunejob",
"worker_id": "mybackup01",
"user": "xxx",
"endtime": 1787742000,
"status": "OK"
}
{
"upid": "UPID:xxx:rte098345iuretoiu345098:aptupdate::xxx:",
"node": "localhost",
"pid": 1622,
"pstart": 5832,
"starttime": 1782836076,
"worker_type": "aptupdate",
"worker_id": null,
"user": "xxx",
"endtime": 1782836077,
"status": "WARNINGS: 1"
}
I have seen in my testing also that
errors=true only removes the OK ones, unknown and warnings for example still shows up.Testing against this
/api2/json/nodes/localhost/tasks?limit=100&errors=true should only yield errors but does not.I'm running the latest version 4.2.5.
There are no errors when the API call is run so nothing seems to be wrong in the API call itself.
Is this an intended behavior or a bug perhaps?
/Regards
Marcus