{"id":19044519,"url":"https://github.com/stdevel/check_netio","last_synced_at":"2025-07-07T18:41:36.247Z","repository":{"id":28204518,"uuid":"31707499","full_name":"stdevel/check_netio","owner":"stdevel","description":"A Nagios / Icinga plugin for checking power states of Koukaan NETIO devices","archived":false,"fork":false,"pushed_at":"2016-10-15T08:16:24.000Z","size":69,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-08T22:46:28.991Z","etag":null,"topics":["icinga","icinga-plugin","koukaam-netio","nagios","netio"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stdevel.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}},"created_at":"2015-03-05T09:57:34.000Z","updated_at":"2021-09-18T17:43:44.000Z","dependencies_parsed_at":"2022-08-02T11:45:49.985Z","dependency_job_id":null,"html_url":"https://github.com/stdevel/check_netio","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdevel%2Fcheck_netio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdevel%2Fcheck_netio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdevel%2Fcheck_netio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdevel%2Fcheck_netio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stdevel","download_url":"https://codeload.github.com/stdevel/check_netio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232168843,"owners_count":18482481,"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":["icinga","icinga-plugin","koukaam-netio","nagios","netio"],"created_at":"2024-11-08T22:46:32.341Z","updated_at":"2025-01-02T08:15:54.895Z","avatar_url":"https://github.com/stdevel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"check_netio\n==========\n\n![Example Icinga screenshot](https://raw.githubusercontent.com/stdevel/check_netio/master/Icinga_Screenshot.png \"Example Icinga screenshot\")\n\n``check_netio`` is a Nagios / Icinga plugin for checking power states of [Koukaam NETIO devices](http://www.koukaam.se/kkmd/products.php?cat_id=19).\n\nRequirements\n============\nI successfully tested the plugin with **NETIO-230A** and **NETIO-230B** devices. Most recent firmware version on newer product releases might not work (*see table below*).\n\nUsage\n=====\nBy default the plugin checks whether your defined power states matches the currently set states. It is also possible to check whether NTP is synchronized. Checking the NETIO is done using the **CGI** or **KShell** interface.\n\nYou need to specify the following parameters:\n\n| Parameter | Description |\n|:----------|:------------|\n| `-d` / `--debug` | enable debugging outputs (*default: no*) |\n| `-s` / `--hostname` | defines the device hostname |\n| `-u` / `--use-kshell` | use KShell instead of CGI (*default: no*) |\n| `-a` / `--authfile` | defines an auth file to use instead of shell variables |\n| `-k` / `--kshell-port` | defines the KShell port (*default: 1234*) |\n| `-u` / `--username` | defines the username |\n| `-w` / `--password` | defines the password |\n| `-y` / `--use-hash` | uses password hash instead of plain password (*default: no*) - currently **not supported** yet, see [issue](https://github.com/stdevel/check_netio/issues/2) |\n| `-g` / `--generate-hash` | generates a password hash and quits (*default: no*) - currently **not supported** yet, see [issue](https://github.com/stdevel/check_netio/issues/2) |\n| `-n` / `--check-ntp` | checks NTP synchronization state - requires KShell (*default: no*) |\n| `-x` / `--port-state` | defines expected port states [*0=off, 1=on, ?=whatever*] |\n\nExamples\n========\nCheck whether the NTP time is synchronized:\n```\n$ ./check_netio.py -s mynetio -u admin -w pass -n\nOK - NTP state is synchronized\n```\n\nCheck whether the NTP time is synchronized, specifying a different KShell port, login information is prompted:\n```\n$ ./check_netio.py -s mynetio -n -p 1337\nUsername: admin\nPassword:\nCRITICAL - NTP NOT synchronized\n```\n\nCheck whether the last port is turned on, login information is assigned using shell variables:\n```\n$ NETIO_LOGIN=admin NETIO_PASSWORD=pass ./check_netio.py -s mynetio -x ???1\nWARNING - port difference detected: 4\n```\n\nCheck all port states and also NTP synchronization state:\n```\n$ ./check_netio.py -s mynetio -x 0001 -n\nUsername: admin\nPassword:\nOK - ports (0001) matching expectations (0001) - NTP synchronized\n```\n\nFirmware support\n================\nSee the table below for tested firmware versions:\n\n| Device | Firmware | Status |\n|:-------|:---------|:-------|\n| **230A** | [2.31](http://www.koukaam.se/kkmd/downloads.php?cat_id=18\u0026download_id=1229) | working |\n| **230A** | [2.32](http://www.koukaam.se/kkmd/downloads.php?cat_id=18\u0026download_id=1314) | working |\n| **230A** | [2.33](http://www.koukaam.se/kkmd/downloads.php?cat_id=18\u0026download_id=1332) | working |\n| **230A** | [2.34RC1](http://www.koukaam.se/kkmd/downloads.php?cat_id=6\u0026download_id=1610) | working |\n| **230B** | [3.12](http://www.koukaam.se/kkmd/downloads.php?cat_id=6\u0026download_id=1693) | working |\n| **230B** | [4.03](http://www.koukaam.se/kkmd/downloads.php?cat_id=6\u0026download_id=1985) | working |\n| **230B** | [4.05](http://www.koukaam.se/kkmd/downloads.php?cat_id=6\u0026download_id=2109) | working |\n| **230C** | [4.03](http://www.koukaam.se/kkmd/downloads.php?cat_id=6\u0026download_id=1986) | *not tested* |\n| **230C** | [4.05](http://www.koukaam.se/kkmd/downloads.php?cat_id=6\u0026download_id=2110) | *not tested* |\n| **230CS** | [4.03](http://www.koukaam.se/kkmd/downloads.php?cat_id=6\u0026download_id=1987) | *not tested* |\n| **230CS** | [4.05](http://www.koukaam.se/kkmd/downloads.php?cat_id=6\u0026download_id=2111) | *not tested* |\n| **NETIO4** | 4.x | *not tested* |\n| **NETIO4-All** | 4.x | *not tested* |\n\nPlease let me know if you have tested the plugin on previously untested devices to complete the list!\n\nAuthentification options\n========================\nBy default login information are prompted interactively - e.g.:\n```\n$ ./check_netio.py -s mynetio -n\nUsername:\nPassword:\n```\n\nIf you want to make the script work unattended you might choose between one of the following options:\n\n##Option 1: script parameters\nA simple but insecure possibility to assign the login information is to use the following parameters:\n* `-u` / `--username`\n* `-w` / `--password`\n\nNote that users having access to your Nagios / Icinga configuration are able to see the login information.\n\n##Option 2: shell variables\nSet those shell variables:\n* **NETIO_LOGIN** - a username\n* **NETIO_PASSWORD** - the appropriate password\n\nYou might also want to set the HISTFILE variable (*depending on your shell*) to hide the command including the password in the history:\n```\n$ HISTFILE=\"\" NETIO_LOGIN=admin NETIO_PASSWORD=pass ./check_netio.py -s mynetio -n\n```\n\n##Option 3: auth file\nA better possibility is to create a authfile with permisions **0600**. Just enter the username in the first line and the password in the second line:\n```\n$ cat authfile\nadmin\npassword\n$ chmod 0600 authfile\n```\nHand the path to the script:\n```\n$ ./check_netio.py -a myauthfile -s mynetio -n\n```\n\nThe scripts will abort if the authfile has insecure permissions (*e.g. 0777*).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstdevel%2Fcheck_netio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstdevel%2Fcheck_netio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstdevel%2Fcheck_netio/lists"}