{"id":18778900,"url":"https://github.com/ramsailopal/irisnagios","last_synced_at":"2025-12-17T19:30:17.471Z","repository":{"id":127742174,"uuid":"357137277","full_name":"RamSailopal/irisnagios","owner":"RamSailopal","description":"Utility to parse Nagios logs and store them in an Intersystems Iris database global","archived":false,"fork":false,"pushed_at":"2021-04-12T16:10:19.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-29T10:27:37.192Z","etag":null,"topics":["intersystems-iris","mumps","nagios"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RamSailopal.png","metadata":{"files":{"readme":"README.md","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":"2021-04-12T09:40:30.000Z","updated_at":"2021-09-21T11:17:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"6fd8b251-7f11-4b4e-875d-f735484b1046","html_url":"https://github.com/RamSailopal/irisnagios","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/RamSailopal%2Firisnagios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamSailopal%2Firisnagios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamSailopal%2Firisnagios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamSailopal%2Firisnagios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RamSailopal","download_url":"https://codeload.github.com/RamSailopal/irisnagios/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239690074,"owners_count":19681035,"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":["intersystems-iris","mumps","nagios"],"created_at":"2024-11-07T20:17:44.757Z","updated_at":"2025-12-17T19:30:17.409Z","avatar_url":"https://github.com/RamSailopal.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"AUTHOR - Raman Sailopal\n\nBACKGROUND - Linux command line utility to parse Nagios logs and import them into an Intersystems IRIS database global\n\nThe utility will allow a full import of the Nagios archive logs and then subsequent periodic import of the \"live\" nagios.log file set up off a cron job\n\nPREREQUISITES -\n                  A working Intersystems IRIS implementation\n                  A working Nagios implementation\n                  iriscmd - Attained from https://github.com/RamSailopal/iriscmd\n\nPARAMETERS -\n\n                  IRIS instance name - First parameter\n                  IRIS namespace - Second Parameter\n                  full - (optional) - Third Parameter - Whether to parse the archive files\n\nUSAGE EXAMPLE - \n                  \n  To run for the first time, run:\n                  \n                  irisnagios \"IRIS\" \"USER\" \"full\"\n\nThis will process all log files in /var/log/nagios/archives\n\nAfter the import of the archives, remove the full third parameter in order to process the \"live\" /var/log/nagios/nagios.log file only, and so:\n\n                  irisnagios \"IRIS\" \"USER\"\n\nThis execution can then be set up of a periodic cron job\n\nTaking the example host check line from the Nagios logs:\n\n                  [1618182000] CURRENT HOST STATE: gateway;UP;HARD;1;PING OK - Packet loss = 0%, R\n                  TA = 0.70 ms\n\nThis line would be translated to:\n\n                  ^NAGIOS(\"gateway\",\"1618182000\",\"hostchk\",\"date\")=\"Mon 12 Apr 2021 00:00:00 BST\"\n                  ^NAGIOS(\"gateway\",\"1618182000\",\"hostchk\",\"State\")=\"UP\"\n                  ^NAGIOS(\"gateway\",\"1618182000\",\"hostchk\",\"Check\")=\"HARD\"\n                  ^NAGIOS(\"gateway\",\"1618182000\",\"hostchk\",\"Info\")=\"PING OK - Packet loss = 0%, R\nTA = 0.70 ms\"                  \n\n   NOTE - The subscript \"hostchk\" is reserved for Nagios host checks and so try not to have service names with this reserved word\n\nTaking the example service check line:\n\n                   [1618182000] CURRENT SERVICE STATE: server1;CPU Temp;OK;HARD;1;sensor ok\n\nThis line would be translated to:\n\n                   ^NAGIOS(\"server1\",\"1618182000\",\"CPU Temp\",\"date\")=\"Mon 12 Apr 2021 00:00:00 BST\"\n                   ^NAGIOS(\"server1\",\"1618182000\",\"hostchk\",\"State\")=\"OK\"\n                   ^NAGIOS(\"server1\",\"1618182000\",\"hostchk\",\"Check\")=\"HARD\"\n                   ^NAGIOS(\"server1\",\"1618182000\",\"hostchk\",\"Info\")=\"sensor ok\"\n\nNAGIOSREAD:\n\nA command line utility is also available to parse the Nagios logs from the global.\n\n   PARAMETERS: - \n              \n            First Parameter - IRIS instance name\n            Second Parameter - IRIS namespace\n            Third Parameter - The host to search Nagios logs for (pass ALL for all hosts)\n            Fourth Parameter - The service to search Nagios logs for (pass ALL for all services) - Pass hostchks to search on host checks and not service checks.\n            Fifth Parameter (Optional) - The date to search logs from in the format (YYYY MM DD HH MM SS) - Pass 0 to search from the start of the logs \n            Sixth Parameter (Optional) - The date to search logs to in the format (YYYY MM DD HH MM SS) - Leave empty to search to the end of the logs.\n\n\n   USAGE EXAMPLE: - \n\n            nagiosread \"IRIS\" \"USER\" \"server1\" \"ALL\" \"2016 02 02 00 00 00\" \"2016 02 02 00 00 00\"\n           \nThe above example will search all services for host server1 occurring at the exact date and time of 2nd February 2016 at 00:00    \n\nINSTALLATION:\n\n    git clone https://github.com/RamSailopal/irisnagios.git\n    cd irisnagios\n    ./install.sh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framsailopal%2Firisnagios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framsailopal%2Firisnagios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framsailopal%2Firisnagios/lists"}