{"id":22302622,"url":"https://github.com/dataoneorg/admin_monitor_process_metrics","last_synced_at":"2025-03-26T00:28:14.838Z","repository":{"id":74058324,"uuid":"124249403","full_name":"DataONEorg/admin_monitor_process_metrics","owner":"DataONEorg","description":"Tail cn-process-metric.log and report metrics","archived":false,"fork":false,"pushed_at":"2018-03-07T15:04:14.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T21:17:11.924Z","etag":null,"topics":["administration","monitoring"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DataONEorg.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-07T14:40:18.000Z","updated_at":"2019-09-20T15:19:20.000Z","dependencies_parsed_at":"2023-07-02T23:30:47.790Z","dependency_job_id":null,"html_url":"https://github.com/DataONEorg/admin_monitor_process_metrics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Fadmin_monitor_process_metrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Fadmin_monitor_process_metrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Fadmin_monitor_process_metrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Fadmin_monitor_process_metrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DataONEorg","download_url":"https://codeload.github.com/DataONEorg/admin_monitor_process_metrics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245564876,"owners_count":20636197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["administration","monitoring"],"created_at":"2024-12-03T18:40:20.204Z","updated_at":"2025-03-26T00:28:14.811Z","avatar_url":"https://github.com/DataONEorg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"admin_monitor_process_metrics\n=============================\n\nTail cn-process-metric.log and report metrics.\n\nPython 2/3 script to tail the ``/var/log/dataone/daemon/cn-process-metric.log`` \nand report the current state of values to:\n\n* A JSON file at ``/var/www/processing_metrics.json``\n* A plain text file at ``/var/www/processing_metrics.txt``\n* Metrics emitted to measure-unm-1.dataone.org over UDP to the statsd receiver.\n\nThe script maintains state between runs using a log offset file \n(``cn-process-metric.log.offset``)and the ``processing_metrics.json`` file and\nso is very efficient after the first run.\n\nThe script is run by cron every minute via an entry in ``/etc/cron.d``\n\n\nInstallation\n------------\n\nInstall `pygtail \u003chttps://pypi.python.org/pypi/pygtail\u003e`_ by::\n\n  pip install -U pygtail\n\nCopy the ``tail_processing_metrics.py`` python and ``tail_processing_metrics`` \nbash script to ``/usr/local/bin``. \n\nMake ``tail_processing_metrics`` executable.\n\nCreate an entry in ``cron.d``::\n\n  # Process the d1-processing metrics log and\n  # place output in a web accessible location\n  #\n  * * * * * root /usr/local/bin/tail_processing_metrics\n\nVerify execution by::\n\n  sudo /usr/local/bin/tail_processing_metrics\n\nThe files ``processing_metrics.json`` and ``processing_metrics.txt`` should be\npresent in ``/var/www``.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdataoneorg%2Fadmin_monitor_process_metrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdataoneorg%2Fadmin_monitor_process_metrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdataoneorg%2Fadmin_monitor_process_metrics/lists"}