{"id":20658068,"url":"https://github.com/ntokos/check-aloxe","last_synced_at":"2026-06-04T17:31:17.026Z","repository":{"id":221148032,"uuid":"179321388","full_name":"ntokos/check-aloxe","owner":"ntokos","description":"A check plugin for nagios/icinga for Alcatel OmniPCX Enterprise PBXs","archived":false,"fork":false,"pushed_at":"2020-10-19T12:58:55.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-17T11:34:01.818Z","etag":null,"topics":["alcatel-lucent","icinga-plugin","monitoring-plugins","nagios-plugin","pbx","perl"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ntokos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","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}},"created_at":"2019-04-03T15:44:44.000Z","updated_at":"2024-02-06T13:01:28.000Z","dependencies_parsed_at":"2024-02-06T14:01:21.034Z","dependency_job_id":"d213eb3d-3f15-486a-8448-302c1b7305af","html_url":"https://github.com/ntokos/check-aloxe","commit_stats":null,"previous_names":["ntokos/check-aloxe"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntokos%2Fcheck-aloxe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntokos%2Fcheck-aloxe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntokos%2Fcheck-aloxe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntokos%2Fcheck-aloxe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ntokos","download_url":"https://codeload.github.com/ntokos/check-aloxe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242768076,"owners_count":20182098,"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":["alcatel-lucent","icinga-plugin","monitoring-plugins","nagios-plugin","pbx","perl"],"created_at":"2024-11-16T18:24:38.540Z","updated_at":"2025-03-09T23:47:51.922Z","avatar_url":"https://github.com/ntokos.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Description\ncheck-aloxe is a plugin written in Perl for use with Icinga/Nagios to check status and report statistics on Alcatel OmniPCX Enterprise (OXE) PBXs.\n\nIt connects (currently only via telnet) to an Alcatel OXE PBX and reports:\n - coupler (i.e. cards) service status for a given crystal number and a user specified list of coupler types or a \n   given coupler number\n - terminal (i.e. phones, faxes etc) status statistics for the PBX or a specific crystal number\n - trunk group channel usage statistics (busy vs total channels) for a given trunk group number\n - link channel usage statistics (busy vs total channels) for a given pair of crystal number/coupler number\n - application software identity (appid) information of the PBX\nThe output includes some basic performance data in format understood by icinga/nagios.\n\n## Compatibility\n- The plugin was written and tested for Icinga2 v.2.8 to 2.11. It probably works on Nagios/Icinga1 too.\n- It is tested for Alcatel OXE Releases 5, 6, 8 and 11.\n\n### Prerequisites\n- The plugin is built using the [Monitoring::Plugin](https://metacpan.org/pod/Monitoring::Plugin) Perl module.\n- It currently also uses the [Net::Telnet](https://metacpan.org/pod/Net::Telnet) Perl module to connect to the PBX.\n\n## How it works\nThe plugin establishes a telnet connection to the PBX and then issues one of the commands:\n- `config`\n- `listerm`\n- `trkstat`\n- `appli_identication`\n\n## Install\n- Just copy the `check_aloxe.pl` file inside your (local) plugins directory.\n- You will then need to create a host configuration with the apropprirate variables, a command and the needed services. See the guide on  [how you can do these in Icinga2](#how-to-use-in-icinga2).\n\n## How to use\nYou can always run it (via command line) with the `-h` or `--help` option to see the help text.\n\nHere is a more detailed explanation of the command options and things to be aware of:\n\n | Option | Value | Description |\n | :--- | :---: | :--- |\n | `-H,--host` | *IPv4 addr string* | IP address of the PBX management interface |\n | `-u,--username` | *String* | Username to use when connecting to PBX (default is mtcl) |\n | `-p,--password` | *String* | Password to use when connecting to PBX (default is mtcl) |\n | `-m,--mode` | *String* | What mode the plugin should run on (i.e. what to check): |\n |   | 'coupler' | Checks the status of couplers in a given crystal number.\u003cbr\u003eIf you provide a list of coupler types (option `-y`) only those coupler types will be checked.\u003cbr\u003eIf you provide a coupler number (option `-c`) only that coupler will be checked.\u003cbr\u003eCouplers in state 'IN SERVICE' are considered OK, those in state 'OUT OF SERVICE' are reported as CRITICAL and those that are *not* in states similar to 'REG NOT INIT', 'MISS MAO FILE', 'MISS OPS FILE' are reported with WARNING.\u003cbr\u003eThe plugin output includes only the CRITICAL/WARNING couplers (otherwise it reports total number of OK couplers).\u003cbr\u003eThe performance data contain status totals per coupler type (value=couplers of this type that are OK;warn=0;crit=0;min=0;max=total couplers of this type) |\n |   | 'link' | Check the channel usage on the link designated by a given crystal/coupler pair (specified via the `-i`, `-c` options) and report Busy vs total channels.\u003cbr\u003eA channel state of value different than 'F' is considered Busy.\u003cbr\u003eIn the current plugin version, there is no way to specify warning/critical thresholds. When *all* link channels are Busy, the plugin will report a WARNING status.\u003cbr\u003eYou can provide a text (via the `-r-` option) describing the PBX on the otherside of the link that will be added on the plugin output (useful as a place to store the crystal/coupler pair of the remote PBX).\u003cbr\u003eThe performance data contain the number of *non* Free channels (value=total non Free channels;warn=total channels;crit=0;min=0;max=total channels). It also contains in and out parameters (same values) so you can create weathermap lines in Nagvis. |\n |   | 'terminal' | Checks the status of the terminals on the PBX.\u003cbr\u003eIf the option `-i` is provided, then only the terminals on the given crystal number will be checked.\u003cbr\u003eThe plugin will report the number of different terminal types, the total number of terminals that are OK and total number of terminals that are not OK (based on the flags of the last column of PBX command 'listerm')\u003cbr\u003eThe performance data contain total status numbers per terminal type (value=total terminals of this type that are OK;warn=0;crit=0;min=0;max=total terminals of this type) |\n |   | 'trunk' | Check, similarly to mode 'link', channel usage on a trunk group.\u003cbr\u003eThe trunk group is specified with its number (via option `-g`) rather than crystal/coupler numbers pair.\u003cbr\u003eThe plugin output, instead of the given remote pbx, will contain the configured name of the trunk group. |\n |   | 'appid' | Check and report the application software identity (i.e. the OXE software release info) of the PBX\u003cbr\u003e |\n | `-i,--crystal` | *Integer* | Perform check on the given crystal number |\n | `-c,--coupler` | *Integer* | Perform check on the given coupler number (and the crystal given by option `-i`) |\n | `-y,--ctype` | *String* | A comma-separated list of coupler types that should be checked (valid only for mode 'coupler') |\n | `-g,--trkgroup` | *Integer* | The trunk group number for which to check channel usage (valid only for mode 'trunk') |\n | `-r,--rdescr` | *String* | A descriptive text of the remote pbx on a link, to be included in the plugin output (only valid for mode 'link') |\n | `-t,--timeout` | *Integer* | Set plugin timeout in secs (currenly this only affects the telnet timeout, see below) |\n | `-v,--verbose` |  | Print verbose information (currently only one verbose level is implemented) |\n\n#### Timeouts\nThe telnet timeout is set to 2secs less than the plugin timeout. The default plugin timeout is 15 secs (setting telnet timeout to 13secs).\nNote that on some PBXs (with old CPUs) the telnet session might not respond in time even with the default timeout. So you might need to consider increasing the plugin timeout (using the `-t|--timeout` option) to more than 15secs if you get telnet timeouts.\n\n### Example runs\n- Check couplers for coupler types in specified list on a given crystal:\n```\ncheck_aloxe.pl -H 10.1.1.1 -u user -p mypass -m coupler -i 0 -y \"CPU6,CPU7_STEP2,INTOF_A,INTOF_B,INTIPA,PRA2,UA32,Z32,Z24,Z24_2,Z12,Z12_2,UAZP,NDDI\"\nCouplers OK - All 19 couplers OK | CPU7_STEP2=2;0;0;0;2 INTIPA=1;0;0;0;1 INTOF_A=6;0;0;0;6 PRA2=10;0;0;0;10\n\ncheck_aloxe.pl -H 10.1.1.1 -u user -p mypass -m coupler -i 3 -y \"CPU6,CPU7_STEP2,INTOF_A,INTOF_B,INTIPA,PRA2,UA32,Z32,Z24,Z24_2,Z12,Z12_2,UAZP,NDDI\"                 \nCouplers CRITICAL -  3-4-Z24: OFF | INTOF_B=1;0;0;0;1 UA32=1;0;0;0;1 Z24=0;0;0;0;1 \n```\n- Check coupler on a given crystal/coupler numbers pair:\n```\ncheck_aloxe.pl -H 10.1.1.1 -u user -p mypass -m coupler -i 0 -c 26\nCouplers OK - All 1 couplers OK | INTOF_A=1;0;0;0;1\n```\n- Check channel usage on link designated by a given crystal/coupler numbers pair\n```\ncheck_aloxe.pl -H 10.1.1.1 -u user -p mypass -m link -i 0 -c 11\nLink from: (0-11) OK - 28 Free channels | NonFree=2;30;0;0;30 in=2;0;0;0;30 out=2;0;0;0;30\n```\n- Check channel usage link designated by a given crystal/coupler numbers pair, remote bpx has the given description\n```\ncheck_aloxe.pl -H 10.1.1.1 -u user -p mypass -m link -i 0 -c 11 -r \"mypbx2 (0-26)\"\nLink from: (0-11) to: mypbx2 (0-26) OK - 28 Free channels | NonFree=2;30;0;0;30 in=2;0;0;0;30 out=2;0;0;0;30\n```\n- Check terminals status on the PBX\n```\ncheck_aloxe.pl -H 10.1.1.1 -u user -p mypass -m terminal\nTerminals OK - 6 types, 677 total terminals, 581 OK, 96 not OK | 4010-VLE_3=69;0;0;0;83 4012-LE=187;0;0;0;227 4019=88;0;0;0;108 4020-LE_3G=37;0;0;0;42 4034-MR2=56;0;0;0;62 AUTPOS=144;0;0;0;155\n```\n- Check terminals status on the PBX only on a given crystal\n```\ncheck_aloxe.pl -H 10.1.1.1 -u user -p mypass -m terminal -i 1\nTerminals OK - 5 types, 262 total terminals, 232 OK, 30 not OK | 4012-LE=79;0;0;0;96 4019=19;0;0;0;26 4020-LE_3G=18;0;0;0;21 4034-MR2=36;0;0;0;38 AUTPOS=80;0;0;0;81\n```\n- Check channel usage statistics on trunk group number 1\n```\ncheck_aloxe.pl -H 10.1.1.1 -u user -p mypass -m trunk -g 1\nTG 1: PSTN-OUT OK - 20 Free channels | NonFree=10;30;0;0;30 in=10;0;0;0;30 out=10;0;0;0;30\n```\n- Get the application software identity of the PBX\n```\ncheck_aloxe.pl -H 10.1.1.1 -u user -p mypass -m appid\nAppId OK - CPU:c7s2, release:8.0, delivery:g1.302, patch:8 (8.0-g1.302-8)\n```\n\n\n### How to use in Icinga2\n1. Create a hosts configuration file (e.g. a *pbx.conf* file inside your icinga2 *conf.d* directory).\nFor each of your PBXs create a host declaration similar (but not limited) to this:\n```processing\nobject Host \"mypbx1\" {\n   import \"generic-host\"\n\n   address = \"pbx ip address\"\n\n   vars.cli_user = \"myuser\"        # in case you use different credentials per PBX\n   vars.cli_pass = \"mypass\"\n   \n   vars.monitorcouplers = \"CPU6,CPU7_STEP2,INTOF_A,INTOF_B,INTIPA,PRA2,UA32,NDDI\"    # add more types\n\n   vars.monitorterminals = true\n\n   vars.monitorrelease = true\n\n   vars.crystals[\"0\"] = { monitor = true }\n   vars.crystals[\"1\"] = { monitor = true }\n   vars.crystals[\"2\"] = { monitor = true }\n   ...\n   ...\n\n   vars.trkgroups[\"1\"] = { monitor = true }\n   vars.trkgroups[\"2\"] = { monitor = true }\n   ...\n   ...\n\n   vars.links[\"2001\"] = {\n        monitor = true\n        crystal = 0\n        coupler = 11\n        remote_description = \"mypbx2 (Crystal:0, Coupler:26)\"\n   }\n   vars.links[\"2002\"] = {\n        monitor = true\n        crystal = 0\n        coupler = 0\n        remote_description = \"mypbx3 (Crystal:0, Coupler:5)\"\n   }\n   ...\n   ...\n}\n```\n2. Now create a command (e.g. inside your *commands.conf* file) like this:\n```processing\n// Command to check Alcatel OXE PBXs\nobject CheckCommand \"aloxe\" {\n    import \"plugin-check-command\"\n    command = [ LocalPluginDir + \"/check_aloxe.pl\" ]\n    arguments = {\n            \"--host\" = \"$aloxe_address$\"\n            \"--username\" = \"$aloxe_username$\"\n            \"--password\" = \"$aloxe_password$\"\n            \"--mode\" = \"$aloxe_mode$\"\n            \"--crystal\" = \"$aloxe_crystal$\"\n            \"--coupler\" = \"$aloxe_coupler$\"\n            \"--ctype\" = \"$aloxe_ctype$\"\n            \"--trkgroup\" = \"$aloxe_trkgroup$\"\n            \"--rdescr\" = \"$aloxe_rdescr$\"\n            \"--timeout\" = \"$aloxe_timeout$\"\n    }\n \n    vars.aloxe_address = \"$address$\"\n    vars.aloxe_username = \"mtcl\"         # if you have same credentials on all your PBXs\n    vars.aloxe_password = \"mypass\"\n    vars.aloxe_mode = \"coupler\"\n    vars.aloxe_timeout = 20\n}\n```\n3. Then create a number of services (e.g. inside your *services.conf* file) that use the command on the hosts.\nIn Icinga2 this is much easy to do by using apply rules.\n\nHere are some examples:\n- create services to check couplers status for each desired crystal:\n```processing\napply Service \"crystal-\" for (crystal =\u003e c_conf in host.vars.crystals) {\n   import \"generic-service\"\n \n   check_command = \"aloxe\"\n \n   if (vars.cli_user) { vars.aloxe_username = vars.cli_user }\n   if (vars.cli_pass) { vars.aloxe_password = vars.cli_pass }\n\n   vars.aloxe_mode = \"coupler\"\n   vars.aloxe_crystal = crystal\n   vars.aloxe_ctype = host.vars.monitorcouplers\n \n   assign where host.address \u0026\u0026 host.vars.crystals \u0026\u0026 host.vars.monitorcouplers \u0026\u0026 c_conf.monitor\n }\n```\n- create services to report channel usage statistics for each trunk group:\n```processing\napply Service \"trunk-group-\" for (tgroup =\u003e t_conf in host.vars.trkgroups) {\n   import \"generic-service\"\n \n   check_command = \"aloxe\"\n \n   if (vars.cli_user) { vars.aloxe_username = vars.cli_user }\n   if (vars.cli_pass) { vars.aloxe_password = vars.cli_pass }\n\n   vars.aloxe_mode = \"trunk\"\n   vars.aloxe_trkgroup = tgroup\n \n   assign where host.address \u0026\u0026 host.vars.trkgroups \u0026\u0026 t_conf.monitor\n }\n```\n- create services to report channel usage statistics for each link:\n```processing\n apply Service \"link-\" for (l_num =\u003e l_conf in host.vars.links) {\n   import \"generic-service\"\n \n   check_command = \"aloxe\"\n \n   if (vars.cli_user) { vars.aloxe_username = vars.cli_user }\n   if (vars.cli_pass) { vars.aloxe_password = vars.cli_pass }\n\n   vars.aloxe_mode = \"link\"\n   vars.aloxe_crystal = l_conf.crystal\n   vars.aloxe_coupler = l_conf.coupler\n   vars.aloxe_rdescr = l_conf.remote_description\n \n   assign where host.address \u0026\u0026 host.vars.links \u0026\u0026 l_conf.monitor\n}\n```\n- create services to report terminal status statistics for each PBX:\n```processing\napply Service \"terminals\" {\n   import \"generic-service\"\n \n   check_command = \"aloxe\"\n \n   if (vars.cli_user) { vars.aloxe_username = vars.cli_user }\n   if (vars.cli_pass) { vars.aloxe_password = vars.cli_pass }\n\n   vars.aloxe_mode = \"terminal\"\n \n   assign where host.address \u0026\u0026 host.vars.monitorterminals\n} \n```\n- create services to report application software identity for each PBX:\n```processing\napply Service \"appl-id\" {\n   import \"generic-service\"\n \n   check_command = \"aloxe\"\n \n   if (vars.cli_user) { vars.aloxe_username = vars.cli_user }\n   if (vars.cli_pass) { vars.aloxe_password = vars.cli_pass }\n\n   vars.aloxe_mode = \"appid\"\n \n   assign where host.address \u0026\u0026 host.vars.monitorrelease\n} \n```\n\n## Possible future additions\n####Implementation\n- Add *ssh* as method of connecting to a PBX (using system call), possibly via command line option. Or even throw away telnet option alltogether.\n- Add a mode to display status of remote crystals connected in a coupler\n- Add a mode to display crystal topology information\n- Add the ability to specify warning/critical thresholds for channel usage in links and trunk groups.\n\n#### Goodies\n- Describe how to configure a NagVis map to show the PBXs and the links interconnecting them.\n\n## Notes\n*Due to lack of available time, I will probably not respond to any requests, while my response to questions and comments will be very limited.*\n\nThis is a pretty amateur effort in perl programming. _I encourage you to improve this plugin to make it better, fit your needs and fix any issues/bugs you find_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntokos%2Fcheck-aloxe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntokos%2Fcheck-aloxe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntokos%2Fcheck-aloxe/lists"}