Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<!-- translations:start -->
[English](README.md) | [简体中文](docs/i18n/zh-CN/README.md) | [हिन्दी](docs/i18n/hi-IN/README.md) | [Español (España)](docs/i18n/es-ES/README.md) | [Español (Latinoamérica)](docs/i18n/es-419/README.md) | [العربية](docs/i18n/ar-SA/README.md)
<!-- translations:end -->

# plugin_fabric

A Cacti 1.2 plugin that brings InfiniBand port counters, link width and speed, and congestion indicators into Cacti as ordinary devices, data sources, and graphs. A link that trained at 1X instead of 4X then shows up as a graph and a Thold alert next to the host it serves, under Cacti's permissions, with Maint able to suppress it.

> **Status: in development, no release yet.** Milestone 2 (foundation) is merged on `main`, and milestone 3 (Cacti objects and alerting) is in review. Milestone 1 confirmed the design against documentation and upstream source (PR #71); the results, with sources, are in [docs/research/](docs/research/). Milestone 2 adds the plugin foundation:
>
> - install, upgrade, uninstall, and the PHP 8.2 guard
> - two realms and the settings
> - View, Operator and Admin realms, and settings
> - fabric records
> - the read-only command boundary for `perfquery`, `ibnetdiscover`, and `iblinkinfo`
> - inventory by GUID, with identity conflicts and re-link proposals
Expand All @@ -22,6 +26,28 @@ A Cacti 1.2 plugin that brings InfiniBand port counters, link width and speed, a
>
> A fabric can be swept only from the main poller until remote data collectors are supported in phase 3. It has been tested against fake tools and the ibsim fabric simulator, never on an InfiniBand fabric. Checks that need a fabric remain open in each research page's live-checks table. This project is not affiliated with the Cacti project.

## Access roles

| Realm | Access |
| --- | --- |
| Fabric View | Existing monitoring pages. |
| Fabric Operator | Monitoring plus the Operations page and personal triage acknowledgments. |
| Fabric Admin | Operator access plus the existing configuration and administrative actions. |

After copying upgrade files, open the Plugins page as an administrator to register
the new realm. Assign the Operator realm explicitly under **Configuration > Users** or user groups.
Upgrades retain the existing View and Admin realm IDs and grants. Admin access
inherits Operator access, and Operator access inherits View access on each request;
this does not add stored grants to users or groups. Plugin settings also require
Fabric Admin access in addition to Cacti's Settings permission.

Cacti device permissions still limit the rows and actions available to each user; unmapped objects require an administrator.
Credentials, configuration, mapping, deletion and other administrative changes
remain in the administrative pages. Acknowledgments last only in the current
user's session, for at most one hour and only while the same observation remains
fresh. New or changed observations invalidate them. They never mark a failed
measurement healthy or suppress alerts.

## Why

A degraded InfiniBand link still passes traffic. A 4X link that retrains at 1X leaves the port "active", and the host's SNMP interface graphs look normal, but tightly coupled jobs slow down. The evidence is in the fabric: each port reports its active, enabled, and supported width and speed, plus error and congestion counters. Reading it takes the InfiniBand diagnostic tools or a fabric manager API. Run by hand, they leave three gaps:
Expand Down
2 changes: 1 addition & 1 deletion docs/PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ Plugin code is object-oriented wherever Cacti's plugin contract allows it. Cacti

- Classes live in `lib/*.php` under the `Somethingwithproof\Fabric` namespace (the plugin is not a Cacti project; the namespace follows the repository owner, as the sibling plugins do), one class per file, loaded by a small `spl_autoload_register()` loader registered only after the PHP version check. No Composer runtime dependency is added. Files stay at depth 2 or less because the translation tooling scans only that deep.
- Settings use the `config_settings` hook. Logging uses `cacti_log()` with a `FABRIC` tag. Strings use the `fabric` text domain with a `locales/` directory and POT file.
- Realms: two, "Fabric View" and "Fabric Admin".
- Realms: three, "Fabric View", "Fabric Operator" and "Fabric Admin".

**Planned classes.** Names are illustrative; milestone 2 settles the set.

Expand Down
122 changes: 122 additions & 0 deletions docs/i18n/ar-SA/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<!-- Source: README.md; SHA256: 19164b87c715ee79192e7772b7cd0029dc6c5e3c07d8ddc7dc44ebabb34ece2b -->

<!-- translations:start -->
[English](../../../README.md) | [简体中文](../zh-CN/README.md) | [हिन्दी](../hi-IN/README.md) | [Español (España)](../es-ES/README.md) | [Español (Latinoamérica)](../es-419/README.md) | [العربية](README.md)
<!-- translations:end -->

<a id="plugin_fabric"></a>
# plugin_fabric

إضافة لـ Cacti 1.2 تُدخل عدّادات منافذ InfiniBand وعرض الروابط وسرعتها ومؤشرات الازدحام إلى Cacti كأجهزة ومصادر بيانات ورسوم عادية. يظهر الرابط الذي تفاوض على 1X بدلًا من 4X كرسم وتنبيه Thold بجانب المضيف الذي يخدمه، ضمن أذونات Cacti ومع إمكانية كبح التنبيه بواسطة Maint.

> **الحالة: قيد التطوير، لم يصدر إصدار بعد.** دُمجت المرحلة المرحلية 2 (الأساس) في `main`، وتخضع المرحلة 3 (كائنات Cacti والتنبيهات) للمراجعة. أكدت المرحلة 1 التصميم بمقارنته بالوثائق والشيفرة الأصلية (PR #71)؛ توجد النتائج ومصادرها في [docs/research/](../../research). تضيف المرحلة 2 أساس الإضافة:
>
> - التثبيت والترقية وإلغاء التثبيت والتحقق من PHP 8.2
> - نطاقات أذونات View وOperator وAdmin والإعدادات
> - سجلات شبكات الربط
> - حدود أوامر للقراءة فقط لأدوات `perfquery` و`ibnetdiscover` و`iblinkinfo`
> - مخزون حسب GUID مع تعارضات الهوية واقتراحات إعادة الربط
> - حالة الروابط وذاكرة مؤقتة لفحوص العدّادات
> - صفحات المخزون والإدارة والحالة الصحية
>
> تضيف المرحلة 3 كائنات Cacti:
>
> - قوالب أجهزة وبيانات ورسوم بصيغة XML لقوالب Cacti، واستعلام البيانات «Fabric Port»
> - ربط عقدة بجهاز Cacti، أو إنشاؤه بعد التأكيد ([ADR 0010](../../decisions/0010-one-device-per-node.md))
> - مصادر بيانات عدّادات للرسوم، ومصادر GAUGE لحالة الروابط ومعدلاتها لاستخدام Thold ([ADR 0011](../../decisions/0011-derive-counters-and-gauge-alert-values.md))
> - معالجة الانقطاعات وقراءة العدّادات الأساسية المشبعة كقيم غير معروفة ([ADR 0012](../../decisions/0012-saturated-basic-counters-read-as-unknown.md))، وصلاحية العدّادات وروابط الرسوم في صفحة المنافذ، وترتيب الازدحام
> - اختبار شامل باستخدام Thold v1.8.2 وMaint v1.3 دون تعديل، ومهمة CI تشغّل أدوات التشخيص الحقيقية على شبكة ربط محاكاة
>
> لا يمكن فحص شبكة الربط إلا من المُستطلِع الرئيسي حتى تُدعم جامعات البيانات البعيدة في المرحلة 3. اختُبرت باستخدام أدوات وهمية ومحاكي شبكات الربط ibsim، ولم تُختبر على شبكة InfiniBand حقيقية. تظل الفحوص التي تحتاج إلى شبكة فعلية معلّقة في جدول الفحوص المباشرة لكل صفحة بحث. هذا المشروع غير تابع لمشروع Cacti.

<a id="access-roles"></a>
## أدوار الوصول

| نطاق الأذونات | الوصول |
| --- | --- |
| Fabric View | صفحات المراقبة الحالية. |
| Fabric Operator | المراقبة وصفحة العمليات والإقرارات الشخصية أثناء التحقيق. |
| Fabric Admin | وصول المشغّل مع الإعدادات والإجراءات الإدارية الحالية. |

بعد نسخ ملفات الترقية، افتح صفحة الإضافات بصفتك مسؤولًا لتسجيل نطاق الأذونات الجديد. امنح نطاق Operator صراحةً ضمن **الإعداد > المستخدمون** أو مجموعات المستخدمين. تحتفظ الترقيات بمعرّفات نطاقي View وAdmin ومنحهما الحالي. يرث Admin وصول Operator ويرث Operator وصول View في كل طلب؛ ولا يضيف ذلك منحًا مخزّنة للمستخدمين أو المجموعات. تتطلب إعدادات الإضافة أيضًا Fabric Admin بالإضافة إلى إذن الإعدادات في Cacti.

تظل أذونات أجهزة Cacti تقيّد الصفوف والإجراءات المتاحة لكل مستخدم؛ وتتطلب الكائنات غير المرتبطة مسؤولًا. تبقى بيانات الاعتماد والإعدادات والربط والحذف والتغييرات الإدارية الأخرى في الصفحات الإدارية. لا تستمر الإقرارات إلا في جلسة المستخدم الحالي، لمدة ساعة على الأكثر وفقط ما دامت الملاحظة نفسها حديثة. تُبطلها الملاحظات الجديدة أو المعدّلة. ولا تجعل قياسًا فاشلًا سليمًا أو تكبح التنبيهات مطلقًا.

<a id="why"></a>
## الدافع

يظل رابط InfiniBand المتدهور ينقل الحركة. الرابط 4X الذي يعيد التفاوض على 1X يترك المنفذ «نشطًا»، وتبدو رسوم واجهات SNMP للمضيف طبيعية، لكن المهام وثيقة الترابط تتباطأ. الدليل موجود في شبكة الربط: يبلغ كل منفذ عن العرض والسرعة النشطين والمفعّلين والمدعومين، إضافة إلى عدّادات الأخطاء والازدحام. تتطلب قراءتها أدوات تشخيص InfiniBand أو واجهة API لمدير شبكة الربط. يترك تشغيلها يدويًا ثلاث فجوات:

- **لا يوجد تاريخ.** تعرض `perfquery` و`iblinkinfo` الحاضر، لذا لا يظهر رابط تدهور الأسبوع الماضي.
- **لا يوجد سياق جهاز.** منافذ شبكة الربط ليست كائنات Cacti، فلا يمكن رسم منفذ بجانب المضيف الذي يغذيه.
- **لا يوجد مسار إلى تنبيهات Cacti.** يعمل Thold وMaint على مصادر بيانات Cacti وأجهزته.

تسد الإضافة هذه الفجوات بقراءة شبكة الربط عبر أدوات تشخيصها (ولاحقًا عبر UFM)، وتحديد العقد والمنافذ بواسطة GUID، ونشر العدّادات وحالة الروابط كمصادر بيانات Cacti. إنها تقرأ فقط: لا تعيد ضبط العدّادات ولا تغيّر حالة المنافذ مطلقًا.

<a id="planned-scope"></a>
## النطاق المخطط

| المرحلة | النطاق | المعالم |
|---|---|---|
| 0، البحث | مصفوفة الإصدارات، تأكيد السلوك الأصلي، سلوك العدّادات على العتاد، نموذج الامتيازات، ميزانية MAD، واجهة UFM API | [M1](https://github.com/somethingwithproof/plugin_fabric/milestone/1) |
| 1، المراقبة | مخزون حسب GUID، أجهزة Cacti، استعلام المنافذ، مصادر بيانات العدّادات وحالة الروابط، تنبيهات Thold، كبح Maint، صفحة الحالة الصحية | [M2](https://github.com/somethingwithproof/plugin_fabric/milestone/2)، [M3](https://github.com/somethingwithproof/plugin_fabric/milestone/3)، [M4](https://github.com/somethingwithproof/plugin_fabric/milestone/4) |
| 2، UFM | واجهة خلفية UFM REST للقراءة فقط، معالجة بيانات الاعتماد، استمرارية الهوية بين الواجهات الخلفية | [M5](https://github.com/somethingwithproof/plugin_fabric/milestone/5) |
| 3، البعيد | جامعات بيانات بعيدة، نسخ متماثل، إجراءات `remote_agent`، فحوص مجزّأة للشبكات الكبيرة | [M6](https://github.com/somethingwithproof/plugin_fabric/milestone/6) |

خارج النطاق: تغيير حالة شبكة الربط، واستبدال مدير شبكة الربط أو الشبكة الفرعية، ومحرك تنبيه خاص بالإضافة، وخدمة خلفية أو بروتوكول شبكة مخصص، وشبكات Ethernet أو RoCE (قيد البحث).

<a id="compatibility-targets"></a>
## أهداف التوافق

| المكوّن | الهدف |
|---|---|
| Cacti | 1.2.31 أو أحدث، دون ترقيعات للنواة |
| PHP | 8.2 أو أحدث؛ يظل `setup.php` قابلًا للتحليل على 8.0 لكي يُرفض وقت التشغيل غير المدعوم بدل تعطيل واجهة Cacti |
| أدوات InfiniBand | infiniband-diags من rdma-core؛ فُحصت تنسيقات الخرج مقابل مصدر v66.0 |
| UFM | واجهة UFM Enterprise REST API، المرحلة 2؛ مصفوفة الإصدارات من مخرجات المعلم 1 |
| Thold وMaint | لا يتطلبان تغييرات |

أبقِ مهلة البرامج النصية في Cacti عند القيمة الافتراضية 25 ثانية أو أكثر. يقيّد الفحص الذي يبدأ بقراءة استعلام بيانات تشغيل الأدوات بتلك المهلة ناقص خمس ثوانٍ، لحجز وقت لقراءة الذاكرة المؤقتة والرد. عند انتهاء الوقت، يعيد الاستعلام آخر عينة حديثة أو قيمة غير معروفة؛ وتعيد الدورة التالية محاولة الفحص. ينطبق هذا الحد على مُستطلِع PHP أيضًا. لا تترك مهلة خمس ثوانٍ أو أقل وقتًا لبدء أداة.

<a id="design"></a>
## التصميم

- [docs/PLAN.md](../../PLAN.md) هو الخطة الكاملة: البنية، والحقائق الأصلية التي تعتمد عليها مع مصادرها والافتراضات التي تنتظر التأكيد، ونموذج الهوية، وقواعد العدّادات وحالة الروابط، وحدود الأمان، وحسابات الأداء، والاختبارات والمخاطر.
- يحتوي [docs/decisions/](../../decisions) على سجلات قرارات البنية المتخذة بالفعل.
- يربط [docs/REQUIREMENTS.md](../../REQUIREMENTS.md) كل معرّف متطلب بمشكلته.

```mermaid
flowchart LR
F[InfiniBand fabric] --> T[infiniband-diags tools, read-only]
F --> U[UFM REST, phase 2]
T --> S[Sweep job on the Cacti poller]
U --> S
S --> C[(Sample cache)]
C --> SS[Script server and data query]
SS --> R[RRD files and Cacti graphs]
SS -->|poller_output| TH[Thold and Maint]
R --> P[Cacti graph permissions]
```

<a id="how-work-is-tracked"></a>
## تتبّع العمل

- تتبع **المعالم** معالم الخطة. لكل منها مشكلة ملحمية تسرد مشكلاتها الفرعية وأدلة اكتمالها.
- تُصنَّف **المشكلات** بالوسوم `type: requirement` و`type: research` و`type: decision` و`type: epic`. تتضمن مشكلات المتطلبات متطلبات مرقمة قابلة للاختبار (`REQ-AREA-NNN`) ومعايير قبول.
- تشمل **الوسوم** أيضًا `area:` و`phase:` و`priority:` و`status:`. راجع [CONTRIBUTING.md](../../../CONTRIBUTING.md#labels).
- تعرض [لوحة المشروع](https://github.com/users/somethingwithproof/projects/8) كل المشكلات عبر المعالم.

<a id="contributing"></a>
## المساهمة

اقرأ [CONTRIBUTING.md](../../../CONTRIBUTING.md). تتطلب عمليات الإيداع إقرار DCO. تجري مناقشة التصميم في المشكلات؛ وتحمل القرارات المفتوحة وسم `type: decision`.

<a id="security"></a>
## الأمان

أبلغ عن الثغرات على نحو خاص؛ راجع [SECURITY.md](../../../SECURITY.md).

<a id="license"></a>
## الترخيص

رخصة GNU العمومية العامة v2.0، وهي رخصة Cacti وإضافاته نفسها. راجع [LICENSE](../../../LICENSE).
Loading
Loading