{"id":46346000,"url":"https://github.com/jamespo/passinga","last_synced_at":"2026-03-04T21:35:27.248Z","repository":{"id":67345148,"uuid":"487935007","full_name":"jamespo/passinga","owner":"jamespo","description":"Push Icinga2 passive check results","archived":false,"fork":false,"pushed_at":"2024-10-02T17:00:28.000Z","size":28,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-14T20:35:18.181Z","etag":null,"topics":["ansible","icinga","monitoring","passive","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamespo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-05-02T17:39:21.000Z","updated_at":"2025-02-20T03:42:33.000Z","dependencies_parsed_at":"2023-12-24T07:45:20.045Z","dependency_job_id":"b756802c-9b36-43f0-9ae7-28f58d5ea022","html_url":"https://github.com/jamespo/passinga","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jamespo/passinga","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamespo%2Fpassinga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamespo%2Fpassinga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamespo%2Fpassinga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamespo%2Fpassinga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamespo","download_url":"https://codeload.github.com/jamespo/passinga/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamespo%2Fpassinga/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30094042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T20:42:30.420Z","status":"ssl_error","status_checked_at":"2026-03-04T20:42:30.057Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ansible","icinga","monitoring","passive","python"],"created_at":"2026-03-04T21:35:26.677Z","updated_at":"2026-03-04T21:35:27.225Z","avatar_url":"https://github.com/jamespo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Passinga - Icinga 2 Passive Check Script\n========================================\n\n## Install ##\n\nCopy passinga.py into your path.\n\nRequirements: Python 3.6+ \u0026 [urllib3](https://pypi.org/project/urllib3/) module.\n\n## Setup ##\n\nCreate an API user just with perms to push check results:\n\n\tobject ApiUser \"icingaapi\" {\n\t   password = \"3wdfkmslke\"\n\t   permissions = [ \"actions/process-check-result\" ]\n\t}\n\nCreate a passive service in Icinga conf:\n\n\tapply Service \"NinjaBackup\" {\n\t\t\tmax_check_attempts = 1\n\t\t\tretry_interval = 5m\n\t\t\tcheck_interval = 5m\n\n\t\t\tenable_active_checks = false\n\n\t\t\tcheck_command = \"dummy\"\n\t\t\tvars.dummy_text = \"No Passive Check Result Received\"\n\t\t\tvars.dummy_state = \"3\"\n\n\t\t\tassign where host.vars.config.backuphost\n\t}\n\nPick it up in a host definition:\n\n    // dbhost.yourdomain.com\n    vars.config.backuphost = \"1\"\n\nConfigure in /etc/passinga or ~/.config/.passinga:\n\n\t[Main]\n\ticinga_url: https://icinga.yourdomain.com:5655\n\tusername: icingaapi\n\tpassword: 3wdfkmslke\n\t# set to on if you trust the cert being presented\n\tverify_ssl: off\n\t# this must match with the host configured for the check in Icinga\n\thostname: dbhost.yourdomain.com\n\n\n## Usage ##\n\n\tusage: passinga.py [-h] [-s {0,1,2,3}] [-n CHECKNAME] [-o EXITOUTPUT] [-m {stdin,ansible,cli}] [-f {1,2,3}]\n\t\n\toptions:\n\t  -h, --help            show this help message and exit\n\t  -s EXITRC, --exitrc EXITRC\n\t                        parent rc to pass in\n\t  -n CHECKNAME, --checkname CHECKNAME\n\t                        Name of check\n\t  -o EXITOUTPUT, --exitoutput EXITOUTPUT\n\t                        exit output\n\t  -m {stdin,ansible,cli}, --mode {stdin,ansible,cli}\n\t  -f {1,2,3}, --fixrc {1,2,3}\n\t                        if exitrc non-zero value to send (1-3)\n\t\n\n### cli mode ###\n\nThis is the default mode.\n\nCapture your job status / output and push to Icinga in a passive check:\n\n\tBACKOUTPUT=$(/usr/bin/backupjob)\n\tBACKSTATUS=$?\n\tpassinga.py -n 'NinjaBackup' -o \"$BACKOUTPUT\" -s $BACKSTATUS -f 1\n\nNote the \"-f 1\" flag - this \"fixes\" the returncode so that any code != 0 sets an Icinga RC of 1 (WARNING).\n\n\n### stdin mode ###\n\nThis can be used to push the status of standard Icinga checks.\n\n    PINGSTATUS=$(mktemp)\n    check_ping -H 2.2.2.2 -w 80,90% -c 90,100% \u003e $PINGSTATUS\n    cat $PINGSTATUS | passinga.py --mode stdin -s $? -n Ping\n    rm $PINGSTATUS\n\nIntermediate step required to capture $?\n\n### ansible mode ###\n\nParse the results of ansible playbooks and push to icinga:\n\n    ANSIBLE_CALLBACKS_ENABLED=json ANSIBLE_STDOUT_CALLBACK=json ansible-playbook mwsync.yml \\\n        | tee | passinga.py --mode ansible -n \"MediaWiki Sync\"\n        \nA helper script \"icansirun\" is included suitable for cron etc which you can use as below:\n\n    CHECKNAME=backup ANSIBLE_CONFIG=/home/ansiman/conf/ansible.cfg icansirun playbook.yml\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamespo%2Fpassinga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamespo%2Fpassinga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamespo%2Fpassinga/lists"}