{"id":27353599,"url":"https://github.com/i-ky/zaipcs","last_synced_at":"2025-04-12T21:06:28.999Z","repository":{"id":78633476,"uuid":"82119148","full_name":"i-ky/zaipcs","owner":"i-ky","description":"Zabbix loadable module for monitoring IPC facilities","archived":false,"fork":false,"pushed_at":"2025-01-01T15:30:11.000Z","size":51,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T21:06:24.369Z","etag":null,"topics":["hacktoberfest","ipc","ipc-resources","monitoring","zabbix","zabbix-agent","zabbix-loadable"],"latest_commit_sha":null,"homepage":"","language":"C","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/i-ky.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":"2017-02-15T23:55:44.000Z","updated_at":"2025-01-01T15:30:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"afa0060a-2010-46c1-a70c-d09f06a4faa7","html_url":"https://github.com/i-ky/zaipcs","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/i-ky%2Fzaipcs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-ky%2Fzaipcs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-ky%2Fzaipcs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-ky%2Fzaipcs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/i-ky","download_url":"https://codeload.github.com/i-ky/zaipcs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631685,"owners_count":21136562,"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":["hacktoberfest","ipc","ipc-resources","monitoring","zabbix","zabbix-agent","zabbix-loadable"],"created_at":"2025-04-12T21:06:28.517Z","updated_at":"2025-04-12T21:06:28.992Z","avatar_url":"https://github.com/i-ky.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zaipcs [![Build Status](https://app.travis-ci.com/i-ky/zaipcs.svg?branch=master)](https://app.travis-ci.com/i-ky/zaipcs) [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/i-ky/zaipcs)\n\n[Zabbix](http://www.zabbix.com)\n[loadable module](https://www.zabbix.com/documentation/current/manual/config/items/loadablemodules)\nfor monitoring\n[System V](https://en.wikipedia.org/wiki/UNIX_System_V)\n[IPC](https://en.wikipedia.org/wiki/Inter-process_communication)\nfacilities\n\n## summary\n\nThis module tries to mimic\n[`ipcs`](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ipcs.html) utility.\nIt can read various information about\n[shared memory segments](https://en.wikipedia.org/wiki/Shared_memory#Support_on_Unix-like_systems),\n[message queues](https://en.wikipedia.org/wiki/Message_queue#Implementation_in_UNIX)\nand\n[semaphore](https://en.wikipedia.org/wiki/Semaphore_(programming)) sets\ngiven IPC object identifier.\nOn Linux it additionally supports\n[low level discovery](https://www.zabbix.com/documentation/current/manual/discovery/low_level_discovery).\n\n## compile\n\n1. [Download](http://www.zabbix.com/download)\nZabbix source or check it out from\n[Git repository](https://git.zabbix.com/):\n```bash\ngit clone https://git.zabbix.com/scm/zbx/zabbix.git --depth 1 /path/to/zabbix/source\n```\n\n\u003e Any version higher than 2.2 (when loadable module support was added) will do. But you need to compile module using sources of the version you will be using it with!\n\n2. Configure Zabbix sources:\n```bash\ncd /path/to/zabbix/source\n./bootstrap.sh\n./configure\n```\n\n3. Get module sources,\npoint them to Zabbix source directory\nand run `make` to build,\nit should produce `zaipcs.so` shared library.\n```bash\ncd /path/to/zaipcs/source\nexport ZABBIX_SOURCE=/path/to/zabbix/source\nmake\n```\n\n## install\n\nCopy `zaipcs.so` to a desired location, set up necessary permissions.\n\n## configure\n\nSet `LoadModulePath` and `LoadModule` parameters in Zabbix\n[agent](https://www.zabbix.com/documentation/current/manual/appendix/config/zabbix_agentd) /\n[proxy](https://www.zabbix.com/documentation/current/manual/appendix/config/zabbix_proxy) /\n[server](https://www.zabbix.com/documentation/current/manual/appendix/config/zabbix_server) configuration file.\n\nRestart Zabbix agent / proxy / server.\n\n## use\n\nConfigure checks:\n* use item type\n[_Simple check_](https://www.zabbix.com/documentation/current/manual/config/items/itemtypes/simple_checks)\nif the module is loaded by server or proxy;\n* use item type\n[_Zabbix agent_ or _Zabbix agent (active)_](https://www.zabbix.com/documentation/current/manual/config/items/itemtypes/zabbix_agent)\nif the module is loaded by agent.\n\n### supported item keys\n\n#### __`ipcs-shmem-details[id,mode,option]`__\n\nThis key mimics `ipcs --shmems --id ...`. __`id`__ is a shared memory segment identifier. Possible combinations of __`mode`__ and __`option`__ with their resulting value are given in the table below.\n\n`mode`        | `option`                             | result\n--------------|--------------------------------------|--------------------------------------\n`owner`       | `uid` \u003cbr\u003e `gid`                     | owner's user id \u003cbr\u003e owner's group id\n`creator`     | `uid` \u003cbr\u003e `gid`                     | creator's user id \u003cbr\u003e creator's group id\n`status`      | `dest` \u003cbr\u003e `locked`                 | 1 if marked for destruction, 0 otherwise \u003cbr\u003e 1 if locked, 0 otherwise\n`permissions` |                                      | access permissions (three octal digits)\n`size`        |                                      | allocated bytes\n`time`        | `attach` \u003cbr\u003e `detach` \u003cbr\u003e `change` | timestamp of the last attachment, 0 if not set \u003cbr\u003e timestamp of the last detachment, 0 if not set \u003cbr\u003e timestamp of the last change, 0 if not set\n`pid`         | `creator` \u003cbr\u003e `last`                | creator process id \u003cbr\u003e last attached or detached process id\n`nattch`      |                                      | number of currect attaches\n\n#### __`ipcs-queue-details[id,mode,option]`__\n\nThis key mimics `ipcs --queues --id ...`. __`id`__ is a message queue identifier. Possible combinations of __`mode`__ and __`option`__ with their resulting value are given in the table below.\n\n`mode`        | `option`                            | result\n--------------|-------------------------------------|--------------------------------------\n`owner`       | `uid` \u003cbr\u003e `gid`                    | owner's user id \u003cbr\u003e owner's group id\n`creator`     | `uid` \u003cbr\u003e `gid`                    | creator's user id \u003cbr\u003e creator's group id\n`permissions` |                                     | access permissions (three octal digits)\n`time`        | `send` \u003cbr\u003e `receive` \u003cbr\u003e `change` | timestamp of the last send operation, 0 if not set \u003cbr\u003e timestamp of the last receive operation, 0 if not set \u003cbr\u003e timestamp of the last change, 0 if not set\n`messages`    |                                     | current number of messages in queue\n`size`        |                                     | maximum number of bytes allowed in queue\n`pid`         | `send` \u003cbr\u003e `receive`               | id of the process that performed the last send operation \u003cbr\u003e id of the process that performed the last receive operation\n\n#### __`ipcs-semaphore-details[id,mode,option]`__\n\nThis key mimics `ipcs --semaphores --id ...`. __`id`__ is a semaphore array identifier. Possible combinations of __`mode`__ and __`option`__ with their resulting value are given in the table below.\n\n`mode`        | `option`                    | result\n--------------|-----------------------------|--------------------------------------\n`owner`       | `uid` \u003cbr\u003e `gid`            | owner's user id \u003cbr\u003e owner's group id\n`creator`     | `uid` \u003cbr\u003e `gid`            | creator's user id \u003cbr\u003e creator's group id\n`permissions` |                             | access permissions (three octal digits)\n`time`        | `semop` \u003cbr\u003e `change`       | timestamp of the last semaphore operation, 0 if not set \u003cbr\u003e timestamp of the last change, 0 if not set\n`nsems`       |                             | number of semaphores in set\n`ncount`      | `sum` \u003cbr\u003e `max` \u003cbr\u003e `idx` | total number of processes waiting for an increase of semaphore values \u003cbr\u003e maximum number of processes waiting for an increase of the semaphore value \u003cbr\u003e index of the semaphore with the most processes waiting for semaphore value to increase\n`zcount`      | `sum` \u003cbr\u003e `max` \u003cbr\u003e `idx` | total number of processes waiting for semaphore values to become 0 \u003cbr\u003e maximum number of processes waiting for the semaphore value to become 0 \u003cbr\u003e index of the semaphore with the most processes waiting for semaphore value to become 0\n\n### supported discovery rules\n\n\u003e These keys use non-standard Linux-specific calls and may not be universally supported\n\n#### __`ipcs-shmem-discovery`__ or __`ipcs-shmem-discovery[...]`__\n\n#### __`ipcs-queue-discovery`__ or __`ipcs-queue-discovery[...]`__\n\n#### __`ipcs-semaphore-discovery`__ or __`ipcs-semaphore-discovery[...]`__\n\nThese keys can accept parameters, but ignore them. This way you can set up several discoveries on the same template or host without many troubles. Low level discovery provides the following macros:\n\n`{#MACRO}` | value\n-----------|----------------------------------------------------\n`{#KEY}`   | key supplied to `shmget(2)`/`msgget(2)`/`semget(2)`\n`{#ID}`    | resource identifier (can be supplied as __`id`__ to __`ipcs-...-details[...]`__)\n`{#OWNER}` | owner's user id\n`{#PERMS}` | access permissions (three octal digits)\n\n### error messages\n\n* _\"invalid resource identifier\"_ - failed to read IPC resource id, it should be a nonnegative integer number\n\n* _\"incorrect number of parameters\"_ - misconfiguration, either too few or too many parameters (depends on `mode`)\n\n* _\"invalid 'mode' parameter\"_ - misconfiguration, `mode` parameter is not recognized\n\n* _\"invalid 'option' parameter\"_ - misconfiguration, please refer to the tables of supported `option` and `mode` combinations\n\n* _\"not supported on this platform\"_ - author does not know yet how to implement feature on your platform, you can assist by providing documentation and/or testing\n\n* various errors from system...\n\n\u003e Zabbix agent / proxy / server needs at least read permissions to discover and obtain details of IPC resources!\n\n## templates\n\nComing later...\n\n## contribute\n\nAuthor is too lazy and too arrogant to test the module properly. Therefore the best thing you can do to help is to compile and test the module in your environment. Feedback, both positive and negative, will be highly appreciated.\n\n### compilation and installation\n\nModule comes without `configure` script. `Makefile` is very primitive. Installation and configuration process is 100% manual. Luckily there is only one file and no dependencies, therefore, it should compile *easily* on on any Unix-like platform. Mind that author earns his money being C developer and finds compiling really easy. If you encounter any problems or simply disagree with his opinion, feel free to provide information about compilation errors, warnings and other issues on your platform.\n\n### feature support\n\nDevelopment was done on Linux, but is based on standard System V IPC functionality. Only low level discovery and a couple of `mode`/`option` combinations depend on non-standard Linux features. If you see _\"not supported on this platform\"_ for the feature you desperately need, if the module is working incorrectly or if it is crashing (unlikely but not impossible) - please provide the output of `man shmctl`, `man msgctl`, `man semctl` and other relevant information for investigation.\n\n### usability\n\nOne more thing you need to know about the author - he does not use Zabbix more than he is obliged to, he has very little monitoring experience and he is an absolute zero in system administration. If you find module configuration too difficult, supported item keys useless or default parameter value choice illogical, feel free to throw your opinion at him.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi-ky%2Fzaipcs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fi-ky%2Fzaipcs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi-ky%2Fzaipcs/lists"}