Skip to content

Conversation

@andygrunwald
Copy link
Contributor

Follow up from hansmi/paperhooks#70

@hansmi hansmi merged commit e41e77d into hansmi:main Nov 10, 2025
2 checks passed
classifierLastTrainedDesc: prometheus.NewDesc("paperless_status_classifier_last_trained_timestamp_seconds", "Number of seconds since 01.01.1970 since the last time the classifier has been trained.", nil, nil),
classifierLastTrainedDesc: prometheus.NewDesc("paperless_status_classifier_last_trained_timestamp_seconds", "Number of seconds since 1970-01-01 since the last time the classifier has been trained.", nil, nil),
sanityCheckStatusDesc: prometheus.NewDesc("paperless_status_sanity_check_status", "Status of the sanity check. 1 is OK, 0 is not OK.", nil, nil),
sanityCheckLastRunDesc: prometheus.NewDesc("paperless_status_sanity_check_last_run_timestamp_seconds", "Number of seconds since 1970-01-01 since the last time the sanity check has been run.", nil, nil),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hansmi Following up the discussion from #107 (comment)

The paperless API exposes this as an absolute timestamp, you are correct:

$ curl -H "Authorization: Token <TOKEN>" http://<PAPERLESS-IP>:8000/api/status/ | jq

{
  "pngx_version": "2.19.5",
  [...]
  "tasks": {
    [...]
    "index_last_modified": "2025-11-10T17:32:32.785706Z",
    "index_error": null,
    "classifier_status": "OK",
    "classifier_last_trained": "2025-11-10T17:05:03.839343Z",
    "classifier_error": null,
    "sanity_check_status": "OK",
    "sanity_check_last_run": "2025-11-10T17:42:29.389326Z",
    "sanity_check_error": null
  }
}

However, i adjusted this according to your proposal:

Most recent sanity check run in seconds since Unix epoch (1970-01-01).

Do you want the paperless_status_classifier_last_trained_timestamp_seconds and paperless_status_index_last_modified_timestamp_seconds in the same form?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants