diff --git a/CHANGELOG.md b/CHANGELOG.md index 220b976..04b238d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ Phase 1, Lustre observation. Not released: pilots on real filesystems, the exter ### Added +- Parallel Filesystem Operator realm and Operations page with current observations and personal acknowledgments. Existing administrators inherit Operator access; operators inherit monitoring access without configuration rights. + - Plugin install, upgrade, and uninstall through Cacti's plugin API, with a refusal on PHP below 8.2 that leaves Cacti working (milestone 2). - Registry of filesystems, nodes, and the networks each poller may reach; a background reader per poller that reads Lustre servers over SSH through a fixed forced-command script, `node/pfs-read.sh` (milestone 2). - A cache of target inventory, condition, capacity, and counters with their freshness, and a health page (milestone 2). diff --git a/README.md b/README.md index e4cac53..b760814 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,35 @@ + +[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) + + # plugin_pfs A Cacti 1.2 plugin that brings parallel filesystem health and load into Cacti: capacity and fill imbalance across targets, per-target throughput, and metadata operation rates. Lustre is the first backend. GPFS (IBM Storage Scale) and BeeGFS follow behind a backend interface. The data lands in ordinary Cacti devices, data sources, and graphs, so Thold and Maint alert on and suppress it unchanged. > **Status: milestone 4, code complete for phase 1, not released.** Milestones 2 (foundation), 3 (Lustre observation), and 4 (alerting and release preparation) are done on `main` or in review. The plugin installs, upgrades, and uninstalls through Cacti's plugin API and refuses PHP below 8.2. A background reader on each poller reads Lustre servers over SSH through a fixed forced-command script ([node/pfs-read.sh](node/pfs-read.sh)) and caches inventory, condition, capacity, and counters with their freshness. Each filesystem becomes a Cacti device with OST and MDT data queries, five overview graphs, per-target graphs on demand, and a summary data source for Thold. Thold v1.8.2 and Maint v1.3, unchanged, alert on and suppress the summary gauges in the end-to-end run; Thold thresholds on counters are not supported with Thold 1.8.2 ([docs/alerting.md](docs/alerting.md)). Every test so far runs on fixture node output in a disposable Cacti: the plugin has not run against a real Lustre node. Still open before a release: pilots on real filesystems ([pilot plan](docs/pilot-plan.md)), the external security review ([self-review](docs/security-review.md)), and scale measurements on documented hardware ([scale](docs/research/scale.md)). Version 0.1.0 is prepared in `INFO` and [CHANGELOG.md](CHANGELOG.md) but not tagged. +## Access roles + +| Realm | Access | +| --- | --- | +| Parallel Filesystem View | Existing monitoring pages. | +| Parallel Filesystem Operator | Monitoring plus the Operations page and personal triage acknowledgments. | +| Parallel Filesystem 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 +Parallel Filesystem 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 When a shared filesystem is slow, the evidence is spread across servers. Lustre keeps its counters per node: `lctl get_param` reports values "on the local node", so each object storage server (OSS) and metadata server (MDS) holds only its own targets' numbers. An operator investigating a slow filesystem needs three answers from different places: diff --git a/docs/PLAN.md b/docs/PLAN.md index 16e547b..60b03ae 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md @@ -349,7 +349,7 @@ Plugin code is object-oriented wherever Cacti's plugin contract allows it. No ma - Classes live under the `Somethingwithproof\Pfs` namespace (provisional: issue #33 names `Cacti\Pfs`; milestone 2 matches plugin_cloud until the owner decides), one class per file, loaded by a small `spl_autoload_register()` loader registered only after the PHP version check. No Composer runtime dependency. - Settings use the `config_settings` hook. Logging uses `cacti_log()` with a `PFS` tag. Forms rely on Cacti's csrf-magic. - Strings use the `pfs` text domain, with a `locales/` directory and POT file. -- Realms: two, "Parallel Filesystem View" and "Parallel Filesystem Admin". +- Realms: three, "Parallel Filesystem View", "Parallel Filesystem Operator" and "Parallel Filesystem Admin". **Planned classes.** Names are illustrative; milestone 2 settles the final set. diff --git a/docs/i18n/ar-SA/README.md b/docs/i18n/ar-SA/README.md new file mode 100644 index 0000000..305a659 --- /dev/null +++ b/docs/i18n/ar-SA/README.md @@ -0,0 +1,102 @@ + + + +[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) + + + +# plugin_pfs + +ملحق لـCacti 1.2 يجلب صحة أنظمة الملفات المتوازية وحملها: السعة وعدم توازن الامتلاء بين الأهداف، والإنتاجية لكل هدف، ومعدلات عمليات البيانات الوصفية. Lustre أول واجهة خلفية، ويتبعه GPFS (IBM Storage Scale) وBeeGFS عبر واجهة خلفية مشتركة. تدخل البيانات أجهزة Cacti ومصادره ورسومه العادية، فينبه Thold ويكبت Maint دون تعديل. + +> **الحالة: المعلم 4، شيفرة المرحلة 1 مكتملة، لم يصدر بعد.** اكتملت المعالم 2 (الأساس) و3 (ملاحظة Lustre) و4 (التنبيه والتحضير للإصدار) على `main` أو هي قيد المراجعة. يُثبّت الملحق ويُرقّى ويُزال عبر API ملحقات Cacti ويرفض PHP أقل من 8.2. يقرأ قارئ خلفي على كل مستطلع خوادم Lustre عبر SSH بسكربت أمر مفروض ثابت ([node/pfs-read.sh](../../../node/pfs-read.sh)) ويخزّن الجرد والحالة والسعة والعدادات مع حداثتها. يصبح كل نظام ملفات جهاز Cacti باستعلامي OST وMDT وخمسة رسوم عامة ورسوم أهداف عند الطلب ومصدر ملخص لـThold. ينبه Thold v1.8.2 ويكبت Maint v1.3 دون تعديل قيم gauge الملخصة في التشغيل الشامل؛ ولا تُدعم عتبات العدادات مع Thold 1.8.2 ([docs/alerting.md](docs/alerting.md)). تعمل جميع الاختبارات حتى الآن على خرج عقد اختباري في Cacti مؤقت: لم يعمل الملحق ضد عقدة Lustre حقيقية. ما يزال قبل الإصدار: تجارب أنظمة حقيقية ([خطة التجربة](../../pilot-plan.md))، ومراجعة أمنية خارجية ([المراجعة الذاتية](../../security-review.md))، وقياسات حجم على عتاد موثّق ([الحجم](../../research/scale.md)). الإصدار 0.1.0 مُعد في `INFO` و[CHANGELOG.md](../../../CHANGELOG.md) لكن دون وسم إصدار. + + +## أدوار الوصول + +| المجال | الوصول | +| --- | --- | +| Parallel Filesystem View | صفحات المراقبة الحالية. | +| Parallel Filesystem Operator | المراقبة إضافةً إلى صفحة العمليات وإقرارات الفرز الشخصية. | +| Parallel Filesystem Admin | وصول Operator إضافةً إلى الإعداد والإجراءات الإدارية الحالية. | + +بعد نسخ ملفات الترقية، افتح صفحة الملحقات كمسؤول لتسجيل المجال الجديد. عيّن مجال Operator صراحةً ضمن **الإعداد > المستخدمون** أو مجموعات المستخدمين. تحتفظ الترقيات بمعرّفات مجالي View وAdmin ومنحهما الحاليين. يرث Admin وصول Operator، ويرث Operator وصول View في كل طلب؛ ولا يضيف ذلك منحًا مخزنة للمستخدمين أو المجموعات. تتطلب إعدادات الملحق وصول Parallel Filesystem Admin إضافةً إلى صلاحية Settings في Cacti. + +تظل صلاحيات أجهزة Cacti تحدّ الصفوف والإجراءات المتاحة لكل مستخدم؛ وتتطلب الكائنات غير المربوطة مسؤولًا. تبقى بيانات الاعتماد والإعداد والربط والحذف والتغييرات الإدارية الأخرى في الصفحات الإدارية. تستمر الإقرارات في جلسة المستخدم الحالي فقط، لمدة ساعة كحد أقصى وطالما بقيت الملاحظة نفسها حديثة. تبطلها الملاحظات الجديدة أو المتغيرة. لا تجعل القياس الفاشل سليمًا ولا تكبت التنبيهات مطلقًا. + + +## الدافع + +عندما يبطؤ نظام ملفات مشترك تتوزع الأدلة بين الخوادم. يحتفظ Lustre بعداداته لكل عقدة: يبلّغ `lctl get_param` قيم «العقدة المحلية»، لذا لا يملك كل خادم تخزين كائنات (OSS) وخادم بيانات وصفية (MDS) إلا أرقام أهدافه. يحتاج المشغّل إلى ثلاثة أجوبة من مواضع مختلفة: + +- **هل يمتلئ هدف بينما غيره فارغ؟** يغيّر عدم التوازن موضع الملفات الجديدة ووقت نفاد مساحة هدف واحد. +- **ما الأهداف أو العمليات المشغولة؟** تبيّن عدادات البايت لكل هدف وعمليات كل MDT هل يرتبط الحمل بالبيانات أو بالبيانات الوصفية. +- **هل المراقبة نفسها حديثة؟** لا يطمئن الرسم المسطح إلا إذا استطاع الملحق رؤية الخوادم. + +يرسم Cacti المضيفين ويضع عتبات القيم بـThold، ولا تملك مؤسسة Cacti على GitHub مستودعًا لمراقبة Lustre أو GPFS أو BeeGFS (بحث بتاريخ 2026-11-14). يسد الملحق الفجوة بقراءة قيم مسموحة للقراءة فقط من عقد التخزين، وتمثيل كل نظام كجهاز Cacti تكون أهدافه فهارس استعلام بيانات. يعيد استخدام رسوم Cacti وصلاحياته ومجمّعاته البعيدة وThold وMaint بدل بناء نسخ موازية. + + +## النطاق المخطط + +| المرحلة | النطاق | المعالم | +|---|---|---| +| 0، البحث | مصفوفة الإصدارات وقرار وصول العقد وتأكيد سلوك المشاريع الأصلية وسلوك العدادات وتجاوز الفشل وقياس الحجم | [M1](https://github.com/somethingwithproof/plugin_pfs/milestone/1) | +| 1، الملاحظة | جرد Lustre وسعته وامتلاؤه وإنتاجية OST ومعدلات MDT والرسوم وتنبيه Thold وكبت Maint وصفحة الصحة | [M2](https://github.com/somethingwithproof/plugin_pfs/milestone/2)، [M3](https://github.com/somethingwithproof/plugin_pfs/milestone/3)، [M4](https://github.com/somethingwithproof/plugin_pfs/milestone/4) | +| 2، التعمق | مجمّعات Cacti البعيدة وعروض على مستوى المهمة والعميل ضمن عدد كائنات محدود | [M5](https://github.com/somethingwithproof/plugin_pfs/milestone/5) | +| 3، الواجهات الخلفية | GPFS (IBM Storage Scale) وBeeGFS | [M6](https://github.com/somethingwithproof/plugin_pfs/milestone/6) | + +خارج النطاق: أي كتابة أو مسح أو إعادة ضبط أو ضبط أداء لعقدة أو نظام ملفات؛ محرك تنبيه خاص؛ خدمة خلفية أو بروتوكول مخصص؛ مصادر بيانات لكل مهمة؛ تغييرات في نواة Cacti أو Thold أو Maint. + + +## أهداف التوافق + +| المكوّن | الهدف | +|---|---| +| Cacti | 1.2.31 أو أحدث، دون ترقيعات للنواة | +| PHP | 8.2 أو أحدث؛ يبقى `setup.php` قابلًا للتحليل على 8.0 كي يُرفض وقت التشغيل غير المدعوم بدل تعطيل الواجهة | +| Lustre | تُحدد خطوط الإصدارات في المعلم 1؛ المصدر والأدلة المفحوصة حتى الآن عند 2.17.0 | +| GPFS وBeeGFS | المرحلة 3؛ الإصدارات يحددها البحث | +| Thold وMaint | لا تعديل مطلوب | + + +## التصميم + +- [docs/PLAN.md](../../PLAN.md) الخطة الكاملة: المعمارية والحقائق المعتمدة من المشاريع الأصلية (بمصادرها وما لم يتحقق بعد) ودلالات العدادات ونموذج الحالة وحدود الأمان وحسابات الأداء والاختبار والمخاطر. +- يغطي [docs/operator-guide.md](docs/operator-guide.md) التثبيت والرسوم والقيم والترقية والنسخ والاستعادة والإزالة واستكشاف الأخطاء؛ ويغطي [docs/alerting.md](docs/alerting.md) Thold وMaint. +- يصف [docs/node-setup.md](docs/node-setup.md) إعداد خادم Lustre ومستطلع للقارئ. +- يحوي [docs/decisions/](../../decisions) سجلات القرارات المعمارية المتخذة. +- يربط [docs/REQUIREMENTS.md](../../REQUIREMENTS.md) كل معرّف متطلب بقضيته. + +```mermaid +flowchart LR + N[Lustre servers: OSS, MDS] -->|fixed read-only request| S[Node source on the Cacti poller] + S --> R[Reader] + R --> C[(Observation cache)] + C --> SS[Script server input] + SS -->|poller_output| T[Thold and Maint] + SS --> RRD[(Cacti RRDs)] + RRD --> G[Cacti graphs and permissions] +``` + + +## كيفية تتبع العمل + +- تتبع **المعالم** معالم الخطة. لكل منها قضية ملحمية تسرد قضاياها الفرعية وأدلة الإكمال. +- تُصنّف **القضايا** بالوسوم: `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/11) جميع القضايا عبر المعالم. + + +## المساهمة + +اقرأ [CONTRIBUTING.md](../../../CONTRIBUTING.md). تتطلب الالتزامات توقيع DCO. نقاش التصميم في القضايا؛ تحمل القرارات المفتوحة الوسم `type: decision`. + + +## الأمان + +أبلغ عن الثغرات بصورة خاصة؛ راجع [SECURITY.md](../../../SECURITY.md). + + +## الترخيص + +رخصة GNU العمومية العامة v2.0، وهي رخصة Cacti وملحقاته نفسها. راجع [LICENSE](../../../LICENSE). diff --git a/docs/i18n/ar-SA/docs/alerting.md b/docs/i18n/ar-SA/docs/alerting.md new file mode 100644 index 0000000..ad0ffca --- /dev/null +++ b/docs/i18n/ar-SA/docs/alerting.md @@ -0,0 +1,65 @@ + + + +# التنبيه باستخدام Thold وMaint + +لا يملك الملحق محرك تنبيه. تعمل عتبات Thold وجداول Maint على مصادر بياناته دون تعديل ([ADR 0002](../../../decisions/0002-alert-through-cacti-data-sources.md)). تبيّن الصفحة ما توضع عليه العتبات وما اختُبر والحدود. + + +## القيم المناسبة للعتبات + +استخدم قيم **ملخص نظام الملفات المتوازي**. لكل رسم عام مصدر ملخص مستقل، لذا أنشئ العتبة من الرسم الذي يعرض القيمة: + +| القيمة | الرسم | مثال عتبة | ملاحظات | +|---|---|---|---| +| `fill_spread_pct` | عدم التوازن | عليا 20 (نقطة مئوية) | أكثر OST امتلاءً ناقص أقلها | +| `fill_max_pct` | الامتلاء | عليا 90 | أكثر OST امتلاءً | +| `targets_missing` | الامتلاء أو عدم التوازن | عليا 0.5 | أهداف مستبعدة من الملخص: مفقودة أو دون قراءة سعة حديثة | +| `targets_unhealthy` | الامتلاء | عليا 0.5 | أهداف تشير أعلام حالتها إلى أنها خارج الخدمة؛ مجهولة عندما لا تُعرف حالة أي هدف | +| `age` | الامتلاء | عليا 3 أضعاف فترة الاستطلاع | الثواني منذ أقدم ملاحظة وراء الملخص؛ رقمية متى رُصد النظام سابقًا، فتستمر بالزيادة عند صمت العقدة | +| `kbytes_avail` | السعة | دنيا بالكيلوبايت | مجهولة إذا فُقد أي OST، فلا تنبه عند الانقطاع | +| `read_bytes_rate`, `write_bytes_rate` | الإنتاجية | عليا، بالبايت في الثانية، استطلاعان | معدلا القراءة والكتابة للنظام اللذان يحسبهما القارئ؛ مجهولان لاستطلاعين أو ثلاثة بعد إعادة الضبط | +| `md_ops_rate` | عمليات البيانات الوصفية | عليا، بالعمليات في الثانية، استطلاعان | معدل عمليات البيانات الوصفية للنظام، محسوب بالطريقة نفسها | +| `read_bytes`, `write_bytes`, `md_ops` | الإنتاجية، عمليات البيانات الوصفية | لا عتبات مع Thold 1.8.2؛ استخدم المعدلات أعلاه | عدادات (DERIVE)، للرسوم فقط | + +يمكن وضع عتبات على قيم gauge لكل هدف (السعة وinodes) بالطريقة نفسها من رسومه. + + +## المدد + +- اضبط مشغّل فشل العتبة على استطلاع واحد على الأقل. يعمل القارئ ومستطلع Cacti بجدولين مستقلين، لذا قد يبلغ عمر القيمة فترة كاملة عند استطلاعها. +- لا تتجاوز القيمة المجهولة (`U`) عتبة عليا أو دنيا مطلقًا. في مصدر Thold 1.8.2 تسلك مسار عدم التجاوز، فتسجّل العتبة المتجاوزة استعادة عند الفجوة (قُرئ في `thold_check_threshold()` ولم يُختبر شاملًا). يظهر الهدف المفقود في `targets_missing` ما دام الملخص حديثًا. عند توقف القراءة وتقادم الملخص تُقدّم كل القيم عدا `age` كـ`U`، بما فيها `targets_missing`، لذا ينبه `age` لانقطاع القراءة؛ استخدم هذه المؤشرات للتنبيه بدل الفجوة. +- تنتج إعادة ضبط العداد فترة مجهولة واحدة في رسمه، واستطلاعين أو ثلاثة مجهولة في مقياس المعدل المقابل. +- يجب أن تكون عتبات المعدل عليا بمشغّل فشل لا يقل عن استطلاعين. لا تدعم المرحلة 1 عتبات المعدل الدنيا ("انخفض معدل الكتابة عن الحد")، لأن الاستطلاع المجهول بعد إعادة الضبط يعيدها إلى حالة الاستعادة ([ADR 0012](../../../decisions/0012-thold-rate-alerts-high-thresholds-only.md#amendment-2026-11-15)). + + +## الصيانة + +أدرج جهاز نظام الملفات في جدول Maint. يفحص Thold الجهاز بدالة Maint نفسها، فلا يعدّ التجاوز ولا يُبلغ عنه أثناء الجدول ولا يسجّل شيئًا له. يستمر الجمع: يقرأ القارئ ويستطلع المستطلع وتسجّل RRD القيم. عند انتهاء الجدول يبدأ التجاوز المستمر العد من الصفر ويُبلغ بعد مشغّل فشل العتبة. + + +## العدادات وThold 1.8.2 + +لا تنشئ عتبات Thold لقيم العدادات (`read_bytes` أو`write_bytes` أو`md_ops` أو عدادات الأهداف) مع Thold 1.8.2. ضع العتبات على مقاييس المعدل بدلًا منها. + +يقدّم الملحق `U` لفترة عداد لا يثق بها: إعادة ضبط، أو دخول هدف إلى المجموع أو خروجه، أو قراءة غير حديثة. يخزّن Thold 1.8.2 تلك `U` كالقيمة الخام السابقة لمصدر DERIVE، وعند القيمة الرقمية التالية يرمي حساب المعدل خطأ PHP `TypeError` داخل معالجة خرج مستطلع Cacti. يعطّل Cacti بعدها Thold وتتوقف معالجة خرج ذلك الاستطلاع. لوحظ هذا في الاختبار الشامل (سطر السجل في [research/thold-counters.md](../../../research/thold-counters.md#milestone-4-end-to-end-run)). + +تتجنب مقاييس المعدل ذلك: يحسب القارئ المعدل ويخزّنه Cacti كـGAUGE، ويقارن Thold المستوى دون حساب. تجعل إعادة الضبط المقياس `U` لاستطلاعين أو ثلاثة، ويقرأه Thold كعدم تجاوز؛ ويمر الاختبار الشامل بهذه الحالة مع بقاء Thold مفعّلًا. يحمي فرع تطوير Thold عند `dc76952` (غير منشور) مسار DERIVE؛ ويمكن إعادة النظر في عتبات العدادات بعد صدور إصدار يتضمن ذلك التغيير. + +إذا عطّل هذا الخطأ Thold، فاحذف عتبة العداد، وأعد تفعيل Thold في صفحة الملحقات، وأنشئ العتبة على مقياس المعدل. + + +## ما اختُبر + +يعمل `tests/bin/alert-replay.sh` مع Thold v1.8.2 (`1eb406bd0f81f3204358cce7bd43c8bb5adc8e4a`) وMaint v1.3 (`cd62de9cc323a4f5a8ac80a8d9dda3c7fa16c470`) دون تعديل، على Cacti مؤقت 1.2.31 وفرع 1.2.x، بخرج عقد اختباري وتشغيلات مستطلع حقيقية. تُحفظ العتبات عبر `save_thold()` في Thold؛ وجدول Maint هو الصفان اللذان تحفظهما صفحة جدوله. + +| السيناريو | العتبة | النتيجة | +|---|---|---| +| عدم توازن الامتلاء ثم توازنه | `fill_spread_pct` فوق 20، استطلاع واحد | إشعار واحد ثم تسجيل استعادة | +| اختفاء OST ثم عودته | `targets_missing` فوق 0.5، استطلاع واحد | إشعار ثم استعادة | +| توقف OSS عن الرد 40 ثانية | `age` فوق 30، استطلاع واحد | إشعار مع بقاء `age` رقميًا، واستعادة عند رد العقدة | +| معدل كتابة أعلى بكثير من العتبة لاستطلاعين | `write_bytes_rate` فوق 1 GB/s، استطلاعان | الأول يتجاوز دون إشعار، والثاني يُشعر، ثم استعادة | +| إعادة ضبط عدادات كل OST ثم ارتفاع معدل الكتابة مجددًا | `write_bytes_rate` | استطلاعان مجهولان بلا تجاوز أو سجل مع بقاء Thold مفعّلًا؛ يعود المعدل رقميًا في الثالث، وتتجاوز القفزة التالية وتُشعر ثم تستعيد | +| عدم توازن داخل جدول Maint لاستطلاعين | `fill_spread_pct` | لا عدّ ولا سجل بينما تسجّل RRD القيمة؛ إشعار في الاستطلاع بعد نهاية الجدول | + +لم يُختبر: تسليم الإشعارات (لا خادم بريد)، ووضع خدمة Thold الخلفية، وMaint على مجمّع بيانات بعيد (*حي*). diff --git a/docs/i18n/ar-SA/docs/node-setup.md b/docs/i18n/ar-SA/docs/node-setup.md new file mode 100644 index 0000000..b82f844 --- /dev/null +++ b/docs/i18n/ar-SA/docs/node-setup.md @@ -0,0 +1,68 @@ + + + +# إعداد العقد + +كيفية إعداد خادم Lustre كي يستطيع قارئ الملحق قراءته ([ADR 0009](../../../decisions/0009-read-nodes-through-a-forced-ssh-command.md)). لم يُنفذ شيء هنا على عقدة Lustre حقيقية بعد؛ الفحوص الحية في [#20](https://github.com/somethingwithproof/plugin_pfs/issues/20) و[خطة التجربة](../../../pilot-plan.md). تثبيت الملحق في Cacti موثّق في [operator-guide.md](operator-guide.md). + + +## على كل خادم Lustre + +1. أنشئ حسابًا مخصصًا غير ذي امتيازات للقارئ، مثل `pfsread`، دون كلمة مرور أو استخدام آخر. +2. ثبّت [node/pfs-read.sh](../../../../node/pfs-read.sh) في `/usr/local/libexec/pfs-read.sh` بملكية root ووضع 0755. لا يقبل معاملات، ولا يقرأ إلا قائمة السماح، ويطبع خرجًا ذا علامات حدود. +3. أضف مفتاح القارئ العام إلى `authorized_keys` للحساب مع السكربت كأمر مفروض، ودون السماح بشيء آخر: + + ``` + restrict,command="/usr/local/libexec/pfs-read.sh" ssh-ed25519 AAAA... cacti-pfs + ``` + + يعطّل `restrict` إعادة التوجيه وإعادة توجيه الوكيل وX11 والطرفية الوهمية. يشغّل sshd الأمر المفروض بدل أي طلب للعميل، فلا يستطيع العميل تشغيل شيء آخر. +4. على Lustre 2.17، ملفا OST `stats` و`recovery_status` في debugfs، ولا يقرأهما افتراضيًا إلا root. دون root أو تركيب debugfs بوضع يسمح للحساب بقراءتهما، تبلّغ تلك الأهداف السعة والحالة لكن تبقى عداداتها مجهولة. ما يُسمح به قرار للموقع ([امتيازات العقد](../../../research/node-privileges.md)). + + +## احتياجات حساب القارئ حسب نوع العقدة + +يحتاج الحساب قراءة الملفات أدناه فقط: دون قاعدة sudo، أو عضوية مجموعة سوى مجموعته، أو كتابة في أي موضع من Lustre، أو استخدام صدفة تسجيل الدخول إلا للأمر المفروض. مستمد من مصدر Lustre ([امتيازات العقد](../../../research/node-privileges.md))؛ ولم يُؤكد على عقدة حقيقية بعد. + +| نوع العقدة | الملفات التي يقرأها السكربت | مقروءة لحساب غير ذي امتيازات | +|---|---|---| +| OSS (2.15، 2.16) | `osd-*/-OST*/kbytes*` و`files*` و`obdfilter/-OST*/degraded` و`no_precreate` و`no_create` و`readonly` تحت `/sys/fs/lustre`؛ و`obdfilter/-OST*/stats` و`recovery_status` تحت `/proc/fs/lustre` | نعم | +| OSS (2.17) | ملفات sysfs نفسها؛ و`stats` و`recovery_status` تحت `/sys/kernel/debug/lustre` | sysfs نعم؛ debugfs لـroot فقط افتراضيًا | +| MDS (الإصدارات الثلاثة) | `osd-*/-MDT*/kbytes*` و`files*` تحت `/sys/fs/lustre`؛ و`mdt/-MDT*/md_stats` تحت `/proc/fs/lustre` | نعم | +| أي نوع | `version` تحت `/sys/fs/lustre` | نعم | + +إذا منح الموقع وصول debugfs على OSS 2.17، ففضّل تركيبًا تسمح فيه `gid` و`mode` بالقراءة لمجموعة مخصصة بدل تشغيل السكربت كـroot، وانتبه أن ذلك يفتح debugfs كله لتلك المجموعة. + + +## التأكد من عدم منح صلاحيات إضافية + +على كل خادم، بصفتك root: + +```sh +id pfsread # only its own group, plus any debugfs group you chose +sudo -l -U pfsread # "not allowed to run sudo" +grep -n pfsread /etc/sudoers /etc/sudoers.d/* 2>/dev/null # nothing +cat ~pfsread/.ssh/authorized_keys # exactly one line, starting with restrict,command="/usr/local/libexec/pfs-read.sh" +ls -l /usr/local/libexec/pfs-read.sh # root-owned, 0755, not writable by pfsread +sshd -T -C user=pfsread,host=cacti,addr= | grep -Ei 'permituserenvironment|authorizedkeyscommand|forcecommand' +``` + +من المستطلع، بصفتك مستخدمه، وبالمفتاح ومنفذ SSH للعقدة المضبوطين (استبدل `` بذلك المنفذ): + +```sh +ssh -F /dev/null -p -i /etc/cacti/pfs/id_ed25519 -o UserKnownHostsFile=/etc/cacti/pfs/known_hosts -o HostKeyAlias= pfsread@
'id; cat /etc/shadow' +``` + +يجب ألا تكون الإجابة إلا خرج سكربت القراءة ذي العلامات (`#pfs-read 1` … `#pfs-read end`)، دون أي خرج للأمر المطلوب. أي شيء آخر يعني أن الأمر المفروض غير فعال؛ أصلحه قبل إضافة العقدة إلى السجل. تحقق من أن `PermitUserEnvironment` يساوي `no` وأن لا كتلة `Match` ولا `AuthorizedKeysCommand` تمنح الحساب مفتاحًا أو أمرًا آخر. + + +## على كل مستطلع Cacti يقرأ العقد + +1. ضع المفتاح الخاص في مسار **ملف مفتاح SSH** (افتراضيًا `/etc/cacti/pfs/id_ed25519`)، مقروءًا لمستخدم المستطلع فقط. لا ينشئه الملحق ولا ينسخه ولا يطبعه مطلقًا. تحذر صفحة الصحة إذا أمكن لمستخدمين آخرين قراءته. +2. ضع مفتاح مضيف كل عقدة في **ملف المضيفين المعروفين** (افتراضيًا `/etc/cacti/pfs/known_hosts`)، تحت اسم نقطة النهاية المسجّل حرفيًا. يتصل القارئ بالعنوان المحلول مع ضبط `HostKeyAlias` إلى نقطة النهاية، ويرفض المفتاح المفقود أو المتغير. لا يقبل مفتاحًا جديدًا بنفسه مطلقًا. +3. اسمح في صفحة السجل بالشبكات التي يجوز لهذا المستطلع الوصول إليها. العقدة التي تُحل نقطة نهايتها إلى أي عنوان خارجها لا تُحفظ ولا تُقرأ. + + +## خيارات SSH + +يشغّل القارئ `ssh` مع `-F /dev/null` قبل كل الخيارات الأخرى، فلا يُقرأ `~/.ssh/config` لمستخدم المستطلع ولا `ssh_config` للنظام، ولا يستطيع محتواهما إضافة خيار أو تغييره. اضبط قيم الموقع في إعدادات الملحق (الإعدادات، أنظمة الملفات المتوازية): مسار عميل SSH وملف المفتاح وملف المضيفين المعروفين ومهلة الاتصال ومهلة القراءة وأقصى حجم استجابة وميزانية القارئ والتزامن. يُضبط منفذ العقدة واسم الدخول لكل عقدة في السجل. لا تُدعم الخيارات خارج هذه الإعدادات، مثل مضيف وسيط أو أمر وكيل. diff --git a/docs/i18n/ar-SA/docs/operator-guide.md b/docs/i18n/ar-SA/docs/operator-guide.md new file mode 100644 index 0000000..0619db1 --- /dev/null +++ b/docs/i18n/ar-SA/docs/operator-guide.md @@ -0,0 +1,124 @@ + + + +# دليل المشغّل + +كيفية تثبيت الملحق وتشغيله وترقيته ونسخه احتياطيًا وإزالته، ومعنى رسومه وقيمه. إعداد العقد في [node-setup.md](node-setup.md)، والتنبيه باستخدام Thold وMaint في [alerting.md](alerting.md). + +الحالة: شيفرة المرحلة 1 مكتملة ولم تعمل إلا مع خرج عقد اختباري في Cacti مؤقت. لم يرد تقرير تجربة على نظام Lustre حقيقي بعد ([#57](https://github.com/somethingwithproof/plugin_pfs/issues/57))؛ اعتبر كل رقم أدناه نتيجة عينات اختبار حتى يرد ذلك. + + +## المتطلبات + +| المكوّن | المتطلب | +|---|---| +| Cacti | 1.2.31 أو أحدث، دون ترقيعات للنواة | +| PHP | 8.2 أو أحدث على كل مضيف يشغّل الويب أو مستطلعًا. على 8.0 أو 8.1 يرفض الملحق التفعيل ويستمر Cacti بالعمل | +| Lustre | خوادم يُوصل إليها عبر SSH بسكربت القراءة المفروض؛ الإصدارات المفحوصة من المصدر 2.15.8 و2.16.1 و2.17.0 | +| مضيف المستطلع | عميل `ssh` ومفتاح خاص للقارئ وملف مضيفين معروفين | + + +## التثبيت + +1. فك الإصدار ليكون دليل الملحق `/plugins/pfs`. يجب تسميته `pfs`؛ يُفك أرشيف GitHub باسم `plugin_pfs-` ويجب إعادة تسميته. +2. في Cacti افتح الإعداد ثم الملحقات وثبّت أنظمة الملفات المتوازية وفعّلها. ينشئ التثبيت الجداول ويسجّل الخطافات وثلاثة مجالات صلاحيات ويستورد قوالب الأجهزة والبيانات والرسوم وينسخ ملفي استعلام البيانات إلى Cacti (القسم التالي). +3. امنح المجالات المطلوبة في إدارة المستخدمين: **Parallel Filesystem View** للجرد والحداثة، و**Parallel Filesystem Operator** لصفحة العمليات وإقرارات الفرز الشخصية، و**Parallel Filesystem Admin** للسجل والصحة. يرث Admin وصول Operator ويرث Operator وصول View في كل طلب دون إضافة منح دائمة. تتبع المجالات الثلاثة صلاحيات أجهزة Cacti. +4. افتح وحدة التحكم ثم صحة أنظمة الملفات المتوازية. يحدد كل تحذير ما يجب إصلاحه. عادةً يظهر غياب مفتاح SSH وملف المضيفين المعروفين حتى إكمال الخطوات التالية. +5. جهّز العقد والمستطلع كما في [node-setup.md](node-setup.md). +6. في إدارة أنظمة الملفات المتوازية اسمح بشبكات كل مستطلع، وأضف نظام الملفات ثم عقده (نقطة النهاية والمنفذ واسم الدخول والدور). لا تُحفظ عقدة تُحل نقطة نهايتها خارج الشبكات المسموحة. +7. انتظر فترة استطلاع. يعمل القارئ من خطاف Cacti `poller_bottom` على كل مستطلع ويملأ الجرد. راجع الأهداف المقترحة في صفحة النظام؛ يخرج الهدف المتجاهل من الاستعلامات والملخص. +8. أنشئ جهاز النظام من الإدارة أو اربطه بجهاز موجود. يسرد الملحق ما سيضيفه قبل إضافته: الجهاز والاستعلامين وخمسة رسوم عامة. تُنشأ رسوم الأهداف عند الطلب من صفحة الرسوم الجديدة في Cacti. + + +### ملفات استعلام البيانات + +لا يقرأ Cacti ملف XML لاستعلام البيانات إلا داخل `/resource`، لذا ينسخ التثبيت `resource/script_server/pfs_osts.xml` و`pfs_mdts.xml` من الملحق إلى `/resource/script_server/`. يرفض رابطًا رمزيًا في أي وجهة ويكتب كل ملف عبر ملف مؤقت في الدليل نفسه. لا يسجّل SHA-256 إلا لملف كتبه: الملف الموجود بالمحتوى نفسه، مثل نسخة يدوية بالخطوات أدناه، يُستخدم لكنه يظل ملكك وتتركه الإزالة. لا يستبدل التثبيت ملفًا لم يكتبه أو تغير لاحقًا، ولا تزيل الإزالة إلا الملفات التي كتبها ولم تتغير. + +إذا لم يستطع مستخدم الويب الكتابة إلى الدليل، تعرض الصحة ذلك ولا تستطيع الاستعلامات سرد الأهداف. انسخ الملفات مرة بحساب مخوّل، مع إبقائها مقروءة لمستخدمي الويب والمستطلع: + +```sh +cd +install -m 0644 plugins/pfs/resource/script_server/pfs_osts.xml resource/script_server/ +install -m 0644 plugins/pfs/resource/script_server/pfs_mdts.xml resource/script_server/ +``` + +ثم استخدم **تثبيت القوالب مجددًا** في الصحة. يزول التحذير حين تطابق النسختان نسختي الملحق. لأنهما ملكك، لا يحدّثهما الملحق ولا يزيلهما: كرر النسخ بعد ترقية تغيّر أي ملف (تحذر الصحة عند الاختلاف)، وأزلهما بنفسك بعد الإزالة. + + +## معنى الرسوم والقيم + +كل نظام ملفات جهاز Cacti واحد. أهدافه OST وMDT فهارس لاستعلامي خادم سكربت. تأتي كل قيمة من ذاكرة القارئ المؤقتة؛ لا يتصل أي رسم أو صفحة أو مصدر بيانات بعقدة. + +| الرسم | القيم | مجهولة عندما | +|---|---|---| +| الامتلاء (عام) | أعلى ومتوسط وأدنى نسبة استخدام OST وأعلى نسبة استخدام inodes للأهداف؛ وتظهر أسفل هذا الرسم أعداد الأهداف الكلية والمفقودة وغير السليمة والثواني منذ أقدم ملاحظة وراء الملخص | نسب السعة: لا يملك أي هدف قراءة حديثة لذلك المقياس؛ عمر البيانات: لم يُرصد قط | +| عدم التوازن (عام) | الفارق بين أعلى وأدنى نسبة استخدام OST | لا يملك أي OST قراءة سعة حديثة | +| السعة (عام) | إجمالي الكيلوبايت والمتاح للنظام | يفقد أي OST أو يتقادم، فيكون المجموع جزئيًا | +| الإنتاجية (عام) | بايتات القراءة والكتابة في الثانية للنظام ومقاييس معدل القراءة والكتابة للتنبيه (تظهر أسفل الرسم) | يفقد OST أو يتقادم أو يكون غير سليم دون عداده أو يُعاد ضبطه خلال الفترة؛ وتكون مقاييس المعدل مجهولة أيضًا لاستطلاعين أو ثلاثة بعد إعادة الضبط | +| البيانات الوصفية (عام) | عمليات البيانات الوصفية في الثانية، جميع العمليات المسموحة معًا، ومقياس معدل العمليات للتنبيه | يفقد MDT أو يتقادم أو يُعاد ضبطه خلال الفترة؛ ويكون مقياس المعدل مجهولًا أيضًا لاستطلاعين أو ثلاثة بعد إعادة الضبط | +| سعة OST وInodes وإنتاجيته (لكل هدف) | المستخدم والمتاح وinodes وبايتات القراءة والكتابة والعمليات في الثانية | الهدف مفقود أو قديم أو لم تطبع العقدة القيمة | +| سعة MDT وعملياته (لكل هدف) | المستخدم والمتاح وinodes والعمليات في الثانية بحسب العملية | كذلك | + +قواعد الجدول: + +- **نسبة الاستخدام** تتبع `lfs df`: المستخدم مقسومًا على المستخدم زائد المتاح، مع التقريب للأعلى. +- **المجهول فجوة لا صفر.** الهدف المفقود والقراءة الفاشلة والقيمة غير المطبوعة تظهر فجوة. +- تُخزّن **العدادات** خامًا كـDERIVE بحد أدنى 0. تجعل إعادة الضبط (انخفاض، أو تغير `start_time`، أو رد عقدة مختلفة بعد تجاوز الفشل، أو قيمة سابقة مجهولة) فترة واحدة فقط مجهولة. +- **الحداثة.** القيمة حديثة حتى فترة ونصف، ومتأخرة حتى ثلاث، وقديمة بعدها. تُقدّم قيم gauge وهي حديثة أو متأخرة؛ أما العدادات ومقاييس المعدل في الملخص فتُقدّم وهي حديثة فقط، فتكون القراءة المفقودة فجوة لا خطًا مسطحًا يتبعه معدل مضاعف. +- **الأهداف الخاملة.** لا يطبع Lustre عدادًا لم يعدّ شيئًا منذ بدايته. تحسبه مجاميع النظام صفرًا لهدف موجود وفي الخدمة وبلّغ قيمه الأخرى في القراءة نفسها؛ يظل رسم الهدف فجوة ([ADR 0013](../../../decisions/0013-absent-counter-lines-count-as-zero-in-sums.md)). +- **تغير مجموعة الأهداف.** عند دخول هدف إلى مجموع أو خروجه، يكون المجموع مجهولًا لاستطلاع واحد كي لا يُرسم تاريخه كله كفترة واحدة. +- تحتفظ **الأهداف المفقودة** بفهرسها ومصادرها وتاريخها حتى يتجاهلها مسؤول في السجل. + + +## الترقية + +1. خذ نسخة احتياطية أولًا (أدناه). +2. استبدل دليل `plugins/pfs` بالإصدار الجديد مع إبقاء الاسم. +3. افتح الإعداد ثم الملحقات. يعرض Cacti الإصدار الجديد ويحدّث الملحق مخططه وخطافاته ومجالاته وقوالبه وملفات الاستعلام عند تحميل إعداد Cacti التالي (ويحدث بفتح الملحقات). تكتمل الترقية المنقطعة عند التحميل التالي. لا يعمل القارئ إذا تأخر المخطط، ويسجّل ضرورة إكمال الترقية. +4. إن كنت ترقي من إصدار تمهيدي يسبق مقاييس المعدل، فاحفظ ما تحتاجه من تاريخ رسمي الإنتاجية والبيانات الوصفية، ثم احذف هذين الرسمين العامين وأعد إنشاءهما. لا تحتوي ملفات RRD الحالية على مصادر بيانات المعدل الجديدة. +5. افحص الصحة وسجل Cacti. تُبلّغ مشكلات القالب أو ملف الاستعلام ولا تُتخطى بصمت. + +يُرفض الرجوع إلى إصدار أقدم إذا كان مخطط قاعدة البيانات أحدث من الشيفرة؛ استعد نسخة ما قبل الترقية بدلًا من ذلك. + + +## النسخ الاحتياطي والاستعادة + +انسخ العناصر التالية معًا في اللحظة نفسها: + +| العنصر | الموضع | +|---|---| +| جداول الملحق | كل جدول `plugin_pfs_*` في قاعدة Cacti (`mysqldump cacti $(mysql -N -e "SHOW TABLES LIKE 'plugin\_pfs\_%'" cacti)`)، أو قاعدة Cacti كاملةً | +| كائنات Cacti | قاعدة البيانات: أجهزة الأنظمة ومصادرها ورسومها والقوالب وإعدادات الملحق في `settings` (`pfs_*`) | +| ملفات RRD | `/rra` أو دليل RRD لديك | +| وصول العقد | على كل مستطلع ملف مفتاح SSH والمضيفين المعروفين من إعدادات الملحق. على كل عقدة حساب القارئ وسطر `authorized_keys` و`/usr/local/libexec/pfs-read.sh` | +| نسخ الاستعلام | `/resource/script_server/pfs_osts.xml` و`pfs_mdts.xml` إذا نسختهما يدويًا | + +للاستعادة أوقف المستطلعات، واستعد قاعدة البيانات ودليل RRD من النسخة نفسها، واستعد المفتاح وملف المضيفين المعروفين، ثم ابدأ المستطلعات. يستأنف القارئ في التشغيل التالي دون تكرار مصادر البيانات: يُطابق الجهاز ومصادره وملفات RRD بمعرّفاتها ومساراتها المخزنة. يرسم أول استطلاع بعد الاستعادة فترة عداد مجهولة واحدة لأن القارئ لا يثق بمعدل عبر الفجوة. إذا كان المخطط المستعاد أقدم من الشيفرة، يكتشفه الملحق ويرقّيه كما سبق. تُختبر الاستعادة بواسطة `tests/bin/restore-flow.php`. + + +## الإزالة + +1. اختياري: صدّر السجل من إدارة أنظمة الملفات المتوازية. +2. عطّل الملحق ثم أزله في الإعداد ثم الملحقات. +3. تزيل العملية الخطافات والمجالات ونسخ ملفات الاستعلام التي كتبها الملحق ولم تتغير. يوقف حذف `poller_bottom` القارئ، فلا تُجمع قيم العقد بعد الإزالة: تحفظ الرسوم تاريخها لكن تتوقف عن التحديث وتصبح قيمها الأحدث مجهولة. تبقى القوالب المستوردة في Cacti كأي قالب مستورد. مع تحديد **الاحتفاظ بجداول الملحق عند الإزالة** (الافتراضي) تبقى الجداول؛ ألغِه لحذفها. + - **الأجهزة.** يبقى كل جهاز افتراضيًا مع مصادر بياناته ورسومه. حدد **حذف الأجهزة التي أنشأها هذا الملحق عند الإزالة** في الإعداد ثم الإعدادات ثم أنظمة الملفات المتوازية (معطّل افتراضيًا) لحذف الأجهزة التي أنشأها الملحق من صفحة الإدارة عبر وظيفة حذف الأجهزة في Cacti: تُحذف معها رسومها ومصادر بياناتها، ولا تُحذف ملفات RRD إلا إذا نص إعداد تنظيف RRD في Cacti على ذلك. يسجّل الملحق كل جهاز ينشئه، صفًا لكل جهاز في `plugin_pfs_created_devices`؛ ولا يدخل الجهاز الموجود الذي ربطته بنظام ملفات هذا السجل مطلقًا ويبقى دائمًا مع الاستعلامات والرسوم العامة التي أضافها الربط. لا يحتفظ نظام الملفات بربط إلى جهاز حُذف، فلا تشير الجداول المحفوظة إلى جهاز محذوف. تحتفظ الإزالة التي تحذف جداول الملحق بجدول `plugin_pfs_created_devices` ما دام يسرد جهازًا لا يزال في Cacti، كي تتمكن إعادة التثبيت والإزالة لاحقًا من حذفه؛ احذف هذا الجدول يدويًا إن كنت ستحتفظ بتلك الأجهزة نهائيًا. إزالة الأجهزة والمصادر والرسوم وملفات RRD التي أنشأتها بنفسك مسؤوليتك. +4. على كل عقدة أزل سطر `authorized_keys` للقارئ والسكربت والحساب. لا تتصل الإزالة بعقد التخزين مطلقًا. + + +## استكشاف الأخطاء وإصلاحها + +ابدأ بالصحة؛ تحدد العقدة والمستطلع والسبب. ثم سجل Cacti مرشّحًا على `PFS`. + +| العَرَض | السبب والإصلاح | +|---|---| +| تعرض عقدة «مفتاح المضيف غير موجود في الملف المعروف أو تغير» | أضف المفتاح أو صححه تحت اسم نقطة النهاية المسجّل حرفيًا. تحقق من المفتاح المتغير بقناة مستقلة قبل الثقة به؛ لا يقبله القارئ بنفسه | +| «أجابت دون علامات سكربت القراءة الثابت» | المفتاح غير مقيد بالأمر المفروض أو الأمر ليس `pfs-read.sh`. أصلح سطر `authorized_keys` | +| «طبعت N معاملات لا يقرأها الملحق» | تشغّل العقدة غير السكربت المرفق. أعد تثبيت `node/pfs-read.sh` | +| «تُحل خارج الشبكات المسموحة» | اسمح بالشبكة للمستطلع في الإدارة أو صحّح نقطة النهاية | +| قراءة عقدة مسجلة فاشلة أو جزئية | تعذر الوصول أو انتهاء مهلة أو إجابة أكبر من **أقصى استجابة**. تحتفظ الأهداف بآخر قيمها حتى التقادم ثم تصبح مجهولة | +| «لم يكمل قارئ المستطلع N تشغيلًا» | لا يشغّل المستطلع `poller_bottom` أو PHP أقل من 8.2 أو **مسار ملف PHP التنفيذي** فارغ في Cacti. يحدد السجل السبب | +| الاستعلامات لا تسرد أهدافًا | نسخ الملفات مفقودة أو مختلفة (راجع ملفات الاستعلام)، أو لم يكمل القارئ قراءة بعد | +| عدادات الهدف فجوة دائمًا | لا يقرأ الحساب ملف OST `stats`. على Lustre 2.17 هو في debugfs ([node-setup.md](node-setup.md)) | +| إنتاجية النظام فجوة لكن إنتاجية الأهداف تُرسم | هدف مفقود أو قديم أو غير سليم أو أُعيد ضبطه للتو؛ تبيّن أعداد المفقود وغير السليم في رسم الامتلاء الحالة | +| الرسوم العامة منشأة لكنها فارغة | يستطلع الجهاز مستطلع غير الذي يقرأ عقده؛ تحذر الصحة من الاختلاف | +| يظهر `Plugin 'thold': Uncaught TypeError` ويُعطّل Thold | رأت عتبة عداد فترة مجهولة؛ احذف العتبة وأعد تفعيل Thold في الملحقات وراجع [alerting.md](alerting.md#counters-and-thold-182) | diff --git a/docs/i18n/es-419/README.md b/docs/i18n/es-419/README.md new file mode 100644 index 0000000..8f57e1c --- /dev/null +++ b/docs/i18n/es-419/README.md @@ -0,0 +1,102 @@ + + + +[English](../../../README.md) | [简体中文](../zh-CN/README.md) | [हिन्दी](../hi-IN/README.md) | [Español (España)](../es-ES/README.md) | [Español (Latinoamérica)](README.md) | [العربية](../ar-SA/README.md) + + + +# plugin_pfs + +Un plugin para Cacti 1.2 que incorpora salud y carga de sistemas de archivos paralelos: capacidad y desequilibrio de ocupación entre destinos, rendimiento por destino y tasas de operaciones de metadatos. Lustre es el primer backend; GPFS (IBM Storage Scale) y BeeGFS seguirán mediante una interfaz de backend. Los datos llegan a dispositivos, fuentes y gráficos Cacti ordinarios, por lo que Thold y Maint alertan y suprimen sin cambios. + +> **Estado: hito 4, código completo para fase 1, sin publicar.** Los hitos 2 (base), 3 (observación Lustre) y 4 (alertas y preparación de publicación) están terminados en `main` o en revisión. El plugin se instala, actualiza y desinstala mediante la API de plugins Cacti y rechaza PHP anterior a 8.2. Un lector en segundo plano en cada sondeador lee servidores Lustre por SSH mediante un script fijo de comando forzado ([node/pfs-read.sh](../../../node/pfs-read.sh)) y almacena inventario, condición, capacidad y contadores con su actualidad. Cada sistema se convierte en dispositivo Cacti con consultas OST y MDT, cinco gráficos generales, gráficos por destino bajo demanda y una fuente de resumen para Thold. Thold v1.8.2 y Maint v1.3, sin cambios, alertan y suprimen los gauges de resumen en la ejecución de extremo a extremo; Thold 1.8.2 no admite umbrales sobre contadores ([docs/alerting.md](docs/alerting.md)). Todas las pruebas hasta ahora usan salida de nodo de prueba en un Cacti desechable: no se ha ejecutado contra un nodo Lustre real. Antes de publicar faltan pilotos en sistemas reales ([plan piloto](../../pilot-plan.md)), revisión externa de seguridad ([autorrevisión](../../security-review.md)) y medidas de escala en hardware documentado ([escala](../../research/scale.md)). La versión 0.1.0 está preparada en `INFO` y [CHANGELOG.md](../../../CHANGELOG.md), pero no etiquetada. + + +## Roles de acceso + +| Ámbito | Acceso | +| --- | --- | +| Parallel Filesystem View | Páginas de monitorización existentes. | +| Parallel Filesystem Operator | Monitorización, página Operaciones y confirmaciones personales de clasificación. | +| Parallel Filesystem Admin | Acceso Operator más configuración y acciones administrativas existentes. | + +Tras copiar los archivos de actualización, abra Plugins como administrador para registrar el nuevo ámbito. Asigne expresamente Operator en **Configuración > Usuarios** o en grupos de usuarios. Las actualizaciones conservan los identificadores y concesiones existentes de View y Admin. En cada solicitud, Admin hereda Operator y Operator hereda View; esto no agrega concesiones persistentes a usuarios ni grupos. Los ajustes del plugin requieren Parallel Filesystem Admin además del permiso Settings de Cacti. + +Los permisos de dispositivo de Cacti siguen limitando las filas y acciones de cada usuario; los objetos sin asignar requieren un administrador. Credenciales, configuración, asignación, borrado y otros cambios administrativos permanecen en las páginas administrativas. Las confirmaciones duran solo en la sesión del usuario actual, como máximo una hora y mientras siga vigente la misma observación. Las observaciones nuevas o modificadas las invalidan. Nunca marcan una medición fallida como correcta ni suprimen alertas. + + +## Motivo + +Cuando un sistema compartido va lento, las evidencias se reparten entre servidores. Lustre guarda contadores por nodo: `lctl get_param` comunica valores «del nodo local», así que cada servidor de almacenamiento de objetos (OSS) y de metadatos (MDS) solo tiene cifras de sus destinos. Un operador necesita tres respuestas desde lugares distintos: + +- **¿Un destino se llena mientras otros están vacíos?** El desequilibrio influye en dónde se crean archivos y cuándo un destino se queda sin espacio. +- **¿Qué destinos u operaciones están ocupados?** Los contadores de bytes por destino y de operaciones por MDT revelan si la carga depende de datos o metadatos. +- **¿Está actualizada la propia monitorización?** Un gráfico plano solo tranquiliza si el plugin pudo ver los servidores. + +Cacti grafica hosts y aplica umbrales con Thold, y su organización GitHub no tiene repositorio para monitorizar Lustre, GPFS o BeeGFS (búsqueda del 2026-11-14). El plugin cubre esa carencia leyendo valores permitidos y de solo lectura de los nodos y representando cada sistema como dispositivo Cacti cuyos destinos son índices de una consulta. Reutiliza gráficos, permisos, recolectores remotos, Thold y Maint de Cacti en lugar de construir versiones paralelas. + + +## Alcance previsto + +| Fase | Alcance | Hitos | +|---|---|---| +| 0, investigación | Matriz de versiones, decisión de acceso, confirmación del comportamiento original, contadores y conmutación por error, escala | [M1](https://github.com/somethingwithproof/plugin_pfs/milestone/1) | +| 1, observación | Inventario Lustre, capacidad y ocupación, rendimiento OST, tasas MDT, gráficos, alertas Thold, supresión Maint y página de estado | [M2](https://github.com/somethingwithproof/plugin_pfs/milestone/2), [M3](https://github.com/somethingwithproof/plugin_pfs/milestone/3), [M4](https://github.com/somethingwithproof/plugin_pfs/milestone/4) | +| 2, profundidad | Recolectores remotos Cacti, vistas por trabajo y cliente con cantidad acotada de objetos | [M5](https://github.com/somethingwithproof/plugin_pfs/milestone/5) | +| 3, backends | Backends GPFS (IBM Storage Scale) y BeeGFS | [M6](https://github.com/somethingwithproof/plugin_pfs/milestone/6) | + +Fuera de alcance: cualquier escritura, borrado, reinicio o ajuste de nodo o sistema de archivos; motor de alertas propio; demonio o protocolo de red personalizado; fuentes por trabajo; cambios en el núcleo Cacti, Thold o Maint. + + +## Objetivos de compatibilidad + +| Componente | Objetivo | +|---|---| +| Cacti | 1.2.31 o posterior, sin parches del núcleo | +| PHP | 8.2 o posterior; `setup.php` sigue siendo analizable en 8.0 para rechazar entornos no compatibles en lugar de romper la interfaz | +| Lustre | Líneas de versión por fijar en el hito 1; código y manuales revisados hasta ahora en 2.17.0 | +| GPFS, BeeGFS | Fase 3; versiones pendientes de investigación | +| Thold, Maint | No requieren cambios | + + +## Diseño + +- [docs/PLAN.md](../../PLAN.md) contiene el plan completo: arquitectura, hechos de proyectos originales de los que depende (con fuentes y lo aún no verificado), semántica de contadores, modelo de estado, límites de seguridad, cálculos de rendimiento, pruebas y riesgos. +- [docs/operator-guide.md](docs/operator-guide.md) cubre instalación, gráficos y valores, actualización, copias y restauración, desinstalación y resolución de problemas; [docs/alerting.md](docs/alerting.md) cubre Thold y Maint. +- [docs/node-setup.md](docs/node-setup.md) explica cómo preparar un servidor Lustre y un sondeador para el lector. +- [docs/decisions/](../../decisions) contiene los registros de decisiones arquitectónicas tomadas. +- [docs/REQUIREMENTS.md](../../REQUIREMENTS.md) relaciona cada requisito con su incidencia. + +```mermaid +flowchart LR + N[Lustre servers: OSS, MDS] -->|fixed read-only request| S[Node source on the Cacti poller] + S --> R[Reader] + R --> C[(Observation cache)] + C --> SS[Script server input] + SS -->|poller_output| T[Thold and Maint] + SS --> RRD[(Cacti RRDs)] + RRD --> G[Cacti graphs and permissions] +``` + + +## Cómo se sigue el trabajo + +- Los **hitos** siguen los del plan. Cada uno tiene una incidencia épica con sus subincidencias y las evidencias de finalización. +- Las **incidencias** se clasifican por etiqueta: `type: requirement`, `type: research`, `type: decision`, `type: epic`. Las de requisito contienen requisitos numerados y verificables (`REQ-AREA-NNN`) y criterios de aceptación. +- Las **etiquetas** también incluyen `area:`, `phase:`, `priority:` y `status:`. Consulte [CONTRIBUTING.md](../../../CONTRIBUTING.md#labels). +- El [tablero del proyecto](https://github.com/users/somethingwithproof/projects/11) muestra todas las incidencias de los hitos. + + +## Contribuir + +Lea [CONTRIBUTING.md](../../../CONTRIBUTING.md). Los commits requieren firma DCO. El diseño se debate en incidencias; las decisiones abiertas llevan `type: decision`. + + +## Seguridad + +Comunique las vulnerabilidades de forma privada; consulte [SECURITY.md](../../../SECURITY.md). + + +## Licencia + +Licencia Pública General GNU v2.0, la misma que Cacti y sus plugins. Consulte [LICENSE](../../../LICENSE). diff --git a/docs/i18n/es-419/docs/alerting.md b/docs/i18n/es-419/docs/alerting.md new file mode 100644 index 0000000..bae4126 --- /dev/null +++ b/docs/i18n/es-419/docs/alerting.md @@ -0,0 +1,65 @@ + + + +# Alertas con Thold y Maint + +El plugin no tiene motor de alertas. Los umbrales de Thold y las programaciones de Maint funcionan sobre sus fuentes de datos sin cambios ([ADR 0002](../../../decisions/0002-alert-through-cacti-data-sources.md)). Esta página explica qué valores usar, qué se probó y los límites. + + +## Sobre qué crear umbrales + +Utilice los valores de **Resumen de sistema de archivos paralelo**. Cada gráfico general tiene su propia fuente de resumen; cree el umbral desde el gráfico que dibuja el valor: + +| Valor | Gráfico | Ejemplo de umbral | Notas | +|---|---|---|---| +| `fill_spread_pct` | Desequilibrio | Alto 20 (puntos porcentuales) | OST más lleno menos el más vacío | +| `fill_max_pct` | Ocupación | Alto 90 | OST más lleno | +| `targets_missing` | Ocupación o Desequilibrio | Alto 0.5 | Destinos excluidos del resumen: ausentes o sin lectura actual de capacidad | +| `targets_unhealthy` | Ocupación | Alto 0.5 | Destinos cuyas condiciones no indican servicio; desconocido si no se conoce la condición de ninguno | +| `age` | Ocupación | Alto 3 veces el intervalo de sondeo | Segundos desde la observación más antigua del resumen; numérico si alguna vez se observó el sistema, por lo que aumenta mientras un nodo calla | +| `kbytes_avail` | Capacidad | Bajo, en kilobytes | Desconocido si falta cualquier OST; no alerta por una interrupción | +| `read_bytes_rate`, `write_bytes_rate` | Rendimiento | Alto, en bytes por segundo, 2 sondeos | Tasas de lectura y escritura del sistema calculadas por el lector; desconocidas durante dos o tres sondeos tras un reinicio | +| `md_ops_rate` | Operaciones de metadatos | Alto, en operaciones por segundo, 2 sondeos | Tasa de operaciones de metadatos del sistema, calculada del mismo modo | +| `read_bytes`, `write_bytes`, `md_ops` | Rendimiento, Operaciones de metadatos | Ninguno con Thold 1.8.2; use las tasas anteriores | Contadores (DERIVE), solo para gráficos | + +Los gauges por destino (capacidad, inodos) admiten umbrales del mismo modo desde sus gráficos. + + +## Duraciones + +- Configure el disparador de fallo con al menos un sondeo. El lector y el sondeador de Cacti tienen programaciones independientes, por lo que un valor puede tener un intervalo de antigüedad al sondearlo Cacti. +- Un valor desconocido (`U`) nunca supera un umbral alto o bajo. En el código de Thold 1.8.2 sigue la ruta sin superación, por lo que un umbral superado registra un restablecimiento ante un hueco (leído en `thold_check_threshold()`, no probado de extremo a extremo). Un destino ausente aparece en `targets_missing` mientras el resumen es actual. Cuando cesan las lecturas y el resumen queda obsoleto, todos los valores salvo `age`, incluido `targets_missing`, se sirven como `U`; por eso `age` alerta de una interrupción de lectura. Alerte sobre estos indicadores, no sobre un hueco. +- Un reinicio de contador produce un intervalo desconocido en su gráfico y dos o tres sondeos desconocidos en el gauge de tasa correspondiente. +- Los umbrales de tasa deben ser altos, con un disparador de fallo de al menos dos sondeos. La fase 1 no admite umbrales de tasa bajos ("la tasa de escritura cayó por debajo"), porque un sondeo desconocido tras un reinicio los restablece ([ADR 0012](../../../decisions/0012-thold-rate-alerts-high-thresholds-only.md#amendment-2026-11-15)). + + +## Mantenimiento + +Incluya el dispositivo del sistema de archivos en una programación Maint. Thold consulta el dispositivo mediante la función de Maint, por lo que durante ella no cuenta ni notifica superaciones ni registra nada por ellas. La recolección continúa: el lector lee, el sondeador sondea y los RRD guardan valores. Al terminar, una superación persistente cuenta desde cero y notifica después del disparador de fallo. + + +## Contadores y Thold 1.8.2 + +No cree umbrales Thold sobre contadores (`read_bytes`, `write_bytes`, `md_ops` o contadores por destino) con Thold 1.8.2. Cree los umbrales sobre los gauges de tasa. + +El plugin sirve `U` para un intervalo de contador no fiable: reinicio, entrada o salida de un destino de la suma o lectura no actual. Thold 1.8.2 guarda ese `U` como valor bruto anterior de una fuente DERIVE; con el siguiente valor numérico, su cálculo de tasa lanza un `TypeError` de PHP en el procesamiento de salida del sondeador de Cacti. Cacti desactiva Thold y se detiene el procesamiento de salida de ese sondeo. Se observó en la ejecución de extremo a extremo (registro en [research/thold-counters.md](../../../research/thold-counters.md#milestone-4-end-to-end-run)). + +Los gauges de tasa evitan esto: el lector calcula la tasa, Cacti la guarda como GAUGE y Thold compara el nivel sin calcular nada. Un reinicio deja el gauge como `U` durante dos o tres sondeos; Thold lo considera no superado y la prueba de extremo a extremo pasa manteniendo Thold activo. La rama de desarrollo de Thold en `dc76952` (sin publicar) protege la ruta DERIVE; los umbrales de contador podrán reconsiderarse cuando una versión incluya ese cambio. + +Si este error desactivó Thold, elimine el umbral del contador, vuelva a activar Thold en Plugins y cree el umbral sobre el gauge de tasa. + + +## Qué se probó + +`tests/bin/alert-replay.sh` se ejecuta con Thold v1.8.2 (`1eb406bd0f81f3204358cce7bd43c8bb5adc8e4a`) y Maint v1.3 (`cd62de9cc323a4f5a8ac80a8d9dda3c7fa16c470`), sin cambios, en un Cacti desechable 1.2.31 y la rama 1.2.x, con salida de nodo de prueba y ejecuciones reales del sondeador. Los umbrales se guardan mediante `save_thold()` de Thold; la programación Maint son las dos filas que guarda su página de programación. + +| Escenario | Umbral | Resultado | +|---|---|---| +| Desequilibrio de ocupación y después equilibrio | `fill_spread_pct` superior a 20, 1 sondeo | Notifica una vez y registra restablecimiento | +| Un OST desaparece y vuelve | `targets_missing` superior a 0.5, 1 sondeo | Notifica y se restablece | +| El OSS no responde durante 40 segundos | `age` superior a 30, 1 sondeo | Notifica mientras `age` sigue numérico; se restablece al responder el nodo | +| Tasa de escritura muy superior al umbral durante dos sondeos | `write_bytes_rate` superior a 1 GB/s, 2 sondeos | El primero supera sin notificar, el segundo notifica y después se restablece | +| Se reinician los contadores de todos los OST y vuelve un pico de escritura | `write_bytes_rate` | Dos sondeos desconocidos sin superación ni registro y con Thold activo; en el tercero vuelve el valor numérico y el siguiente pico supera, notifica y se restablece | +| Desequilibrio durante una programación Maint, dos sondeos | `fill_spread_pct` | Sin recuento ni registro mientras el RRD guarda el valor; notifica en el sondeo posterior al fin de la programación | + +No probado: entrega de notificaciones (sin servidor de correo), modo demonio de Thold y Maint en un recolector remoto (*en vivo*). diff --git a/docs/i18n/es-419/docs/node-setup.md b/docs/i18n/es-419/docs/node-setup.md new file mode 100644 index 0000000..2318afd --- /dev/null +++ b/docs/i18n/es-419/docs/node-setup.md @@ -0,0 +1,68 @@ + + + +# Configuración de nodos + +Cómo preparar un servidor Lustre para que el lector del plugin pueda leerlo ([ADR 0009](../../../decisions/0009-read-nodes-through-a-forced-ssh-command.md)). Nada de esto se ha ejecutado aún en un nodo Lustre real; las comprobaciones reales están en [#20](https://github.com/somethingwithproof/plugin_pfs/issues/20) y el [plan piloto](../../../pilot-plan.md). La instalación en Cacti está en [operator-guide.md](operator-guide.md). + + +## En cada servidor Lustre + +1. Cree una cuenta dedicada sin privilegios para el lector, por ejemplo `pfsread`, sin contraseña ni otro uso. +2. Instale [node/pfs-read.sh](../../../../node/pfs-read.sh) como `/usr/local/libexec/pfs-read.sh`, propiedad de root y modo 0755. No acepta argumentos, solo lee su lista permitida e imprime salida delimitada. +3. Agregue la clave pública del lector al `authorized_keys` de esa cuenta con el script como comando forzado y sin permitir nada más: + + ``` + restrict,command="/usr/local/libexec/pfs-read.sh" ssh-ed25519 AAAA... cacti-pfs + ``` + + `restrict` desactiva reenvíos, reenvío de agente, X11 y pseudoterminal. sshd ejecuta el comando forzado en lugar de lo que solicite el cliente, de modo que este no puede ejecutar otra cosa. +4. En Lustre 2.17, los archivos OST `stats` y `recovery_status` están en debugfs, legible solo por root de forma predeterminada. Sin root o un montaje debugfs cuyo modo permita leerlos a la cuenta, esos destinos comunican capacidad y condición, pero sus contadores siguen desconocidos. Qué permitir es una decisión del sitio ([privilegios de nodo](../../../research/node-privileges.md)). + + +## Qué necesita la cuenta lectora por tipo de nodo + +La cuenta lectora solo necesita leer los archivos siguientes: sin reglas sudo, sin grupos aparte del propio, sin escritura en Lustre y sin uso del shell de inicio de sesión salvo el comando forzado. Deducido del código de Lustre ([privilegios de nodo](../../../research/node-privileges.md)); aún no confirmado en un nodo real. + +| Tipo de nodo | Archivos que lee el script | Legibles sin privilegios | +|---|---|---| +| OSS (2.15, 2.16) | `osd-*/-OST*/kbytes*`, `files*` y `obdfilter/-OST*/degraded`, `no_precreate`, `no_create`, `readonly` bajo `/sys/fs/lustre`; `obdfilter/-OST*/stats` y `recovery_status` bajo `/proc/fs/lustre` | Sí | +| OSS (2.17) | Los mismos archivos sysfs; `stats` y `recovery_status` bajo `/sys/kernel/debug/lustre` | Sysfs sí; debugfs solo para root por defecto | +| MDS (los tres) | `osd-*/-MDT*/kbytes*`, `files*` bajo `/sys/fs/lustre`; `mdt/-MDT*/md_stats` bajo `/proc/fs/lustre` | Sí | +| Cualquiera | `version` bajo `/sys/fs/lustre` | Sí | + +Si el sitio concede acceso debugfs en OSS 2.17, prefiera un montaje cuyo `gid` y `mode` permitan leer a un grupo dedicado en lugar de ejecutar el script como root; tenga en cuenta que esto abre todo debugfs a ese grupo. + + +## Confirmar que no se concede nada más + +En cada servidor, como root: + +```sh +id pfsread # only its own group, plus any debugfs group you chose +sudo -l -U pfsread # "not allowed to run sudo" +grep -n pfsread /etc/sudoers /etc/sudoers.d/* 2>/dev/null # nothing +cat ~pfsread/.ssh/authorized_keys # exactly one line, starting with restrict,command="/usr/local/libexec/pfs-read.sh" +ls -l /usr/local/libexec/pfs-read.sh # root-owned, 0755, not writable by pfsread +sshd -T -C user=pfsread,host=cacti,addr= | grep -Ei 'permituserenvironment|authorizedkeyscommand|forcecommand' +``` + +Desde el sondeador, como su usuario, con la clave y el puerto SSH del nodo configurados (sustituya `` por dicho puerto): + +```sh +ssh -F /dev/null -p -i /etc/cacti/pfs/id_ed25519 -o UserKnownHostsFile=/etc/cacti/pfs/known_hosts -o HostKeyAlias= pfsread@
'id; cat /etc/shadow' +``` + +La respuesta debe ser exclusivamente la salida delimitada del script (`#pfs-read 1` … `#pfs-read end`), sin salida del comando solicitado. Cualquier otra cosa indica que el comando forzado no está activo; corríjalo antes de agregar el nodo al registro. Compruebe que `PermitUserEnvironment` sea `no` y que ningún bloque `Match` ni `AuthorizedKeysCommand` dé otra clave o comando a la cuenta. + + +## En cada sondeador Cacti que lea nodos + +1. Coloque la clave privada en **Archivo de clave SSH** (predeterminado `/etc/cacti/pfs/id_ed25519`), legible solo por el usuario del sondeador. El plugin nunca la crea, copia ni imprime. La página de estado avisa si otros usuarios pueden leerla. +2. Coloque la clave de host de cada nodo en **Archivo de hosts conocidos** (predeterminado `/etc/cacti/pfs/known_hosts`) bajo el nombre de endpoint exacto del registro. El lector conecta a la dirección resuelta con `HostKeyAlias` igual al endpoint y rechaza claves ausentes o cambiadas. Nunca acepta una nueva por sí mismo. +3. En el registro, permita las redes que puede alcanzar ese sondeador. Un nodo cuyo endpoint resuelva a cualquier dirección fuera de ellas no se guarda ni se lee. + + +## Opciones SSH + +El lector ejecuta `ssh` con `-F /dev/null` antes de cualquier otra opción, por lo que no lee `~/.ssh/config` del usuario del sondeador ni `ssh_config` del sistema; nada en ellos puede agregar o modificar opciones. Configure valores del sitio en los ajustes del plugin (Ajustes, Sistemas de archivos paralelos): ruta del cliente SSH, archivo de clave, hosts conocidos, tiempo de conexión, tiempo de lectura, tamaño máximo de respuesta, presupuesto del lector y concurrencia. El puerto y el usuario de inicio de sesión se configuran por nodo en el registro. No se admiten opciones fuera de estos ajustes, como un host de salto o un comando proxy. diff --git a/docs/i18n/es-419/docs/operator-guide.md b/docs/i18n/es-419/docs/operator-guide.md new file mode 100644 index 0000000..19a634e --- /dev/null +++ b/docs/i18n/es-419/docs/operator-guide.md @@ -0,0 +1,124 @@ + + + +# Guía del operador + +Cómo instalar, ejecutar, actualizar, respaldar y eliminar el plugin, y qué significan sus gráficos y valores. La preparación de nodos está en [node-setup.md](node-setup.md); las alertas con Thold y Maint, en [alerting.md](alerting.md). + +Estado: la fase 1 tiene el código completo y solo se ha ejecutado con salida de nodo de prueba en un Cacti desechable. No hay informes de un piloto en un Lustre real ([#57](https://github.com/somethingwithproof/plugin_pfs/issues/57)); hasta entonces, considere cada cifra siguiente un resultado de muestras de prueba. + + +## Requisitos + +| Componente | Requisito | +|---|---| +| Cacti | 1.2.31 o posterior, sin parches del núcleo | +| PHP | 8.2 o posterior en cada host Cacti que ejecute la web o un sondeador. En 8.0 o 8.1 el plugin rechaza activarse y Cacti sigue funcionando | +| Lustre | Servidores accesibles por SSH con el script de lectura forzado; versiones comprobadas en código: 2.15.8, 2.16.1 y 2.17.0 | +| Host del sondeador | Cliente `ssh`, clave privada del lector y archivo de hosts conocidos | + + +## Instalar + +1. Descomprima la versión para que el directorio sea `/plugins/pfs`. Debe llamarse `pfs`; el archivo fuente de GitHub se extrae como `plugin_pfs-` y hay que renombrarlo. +2. En Cacti abra Configuración, Plugins, e instale y active Sistemas de archivos paralelos. La instalación crea tablas, registra hooks y tres ámbitos, importa plantillas de dispositivo, datos y gráficos y copia dos archivos de consulta a Cacti (sección siguiente). +3. Asigne los ámbitos necesarios en Gestión de usuarios: **Parallel Filesystem View** para inventario y actualidad, **Parallel Filesystem Operator** para la página Operaciones y confirmaciones personales de clasificación, y **Parallel Filesystem Admin** para registro y estado. En cada solicitud, Admin hereda Operator y Operator hereda View, sin añadir concesiones persistentes. Los tres respetan los permisos de dispositivo de Cacti. +4. Abra Consola, Estado de sistemas de archivos paralelos. Cada aviso indica qué corregir. Una instalación nueva suele indicar que faltan la clave SSH y los hosts conocidos hasta completar los pasos siguientes. +5. Prepare nodos y sondeador según [node-setup.md](node-setup.md). +6. En Administración de sistemas de archivos paralelos permita las redes de cada sondeador, agregue el sistema y después sus nodos (endpoint, puerto, nombre de usuario, rol). No se guarda un nodo cuyo endpoint resuelva fuera de las redes permitidas. +7. Espere un intervalo. El lector se ejecuta desde `poller_bottom` de Cacti en cada sondeador y rellena el inventario. Revise los destinos propuestos en la página del sistema; ignorar uno lo excluye de las consultas y el resumen. +8. Cree el dispositivo del sistema desde administración, o asígnelo a uno existente. El plugin enumera antes lo que agregará: dispositivo, ambas consultas y cinco gráficos generales. Los gráficos por destino se crean bajo demanda desde Nuevos gráficos de Cacti. + + +### Archivos de consulta de datos + +Cacti solo lee XML de consulta dentro de `/resource`, por lo que se copian `resource/script_server/pfs_osts.xml` y `pfs_mdts.xml` del plugin a `/resource/script_server/`. Se rechaza un enlace simbólico en cualquiera de los destinos y cada archivo se escribe mediante un temporal en el mismo directorio. Solo registra SHA-256 de archivos que escribe: uno existente con el mismo contenido, por ejemplo copiado con los pasos siguientes, se usa pero sigue siendo suyo y no se desinstala. Nunca sustituye archivos ajenos o modificados posteriormente; solo elimina los propios que no han cambiado. + +Si el usuario web no puede escribir allí, la página de estado lo indica y las consultas no pueden listar destinos. Copie una vez con un usuario autorizado, manteniendo lectura para usuarios web y sondeador: + +```sh +cd +install -m 0644 plugins/pfs/resource/script_server/pfs_osts.xml resource/script_server/ +install -m 0644 plugins/pfs/resource/script_server/pfs_mdts.xml resource/script_server/ +``` + +Después pulse **Instalar las plantillas de nuevo** en Estado. El aviso desaparece cuando ambas copias coinciden. Al ser suyas, el plugin no las actualiza ni elimina: repita la copia después de una actualización que cambie algún archivo (Estado avisa si difieren) y elimínelas usted tras desinstalar. + + +## Significado de gráficos y valores + +Cada sistema de archivos es un dispositivo Cacti. Sus destinos OST y MDT son índices de dos consultas del servidor de scripts. Todos los valores vienen de la caché del lector; ningún gráfico, página ni fuente contacta con nodos. + +| Gráfico | Valores | Desconocido cuando | +|---|---|---| +| Ocupación (general) | Máximo, media y mínimo del porcentaje usado OST y máximo del porcentaje usado de inodos por destino; totales de destinos, ausentes, no saludables y segundos desde la observación más antigua del resumen, impresos bajo este gráfico | Porcentajes de capacidad: ningún destino tiene una lectura actual de esa métrica; antigüedad: nunca observado | +| Desequilibrio (general) | Diferencia entre los porcentajes usados OST máximo y mínimo | Ningún OST tiene lectura actual de capacidad | +| Capacidad (general) | Kilobytes totales y disponibles del sistema | Falta cualquier OST o está obsoleto, por lo que el total sería parcial | +| Rendimiento (general) | Bytes leídos y escritos por segundo del sistema y gauges de tasa de lectura y escritura para alertas (bajo el gráfico) | Algún OST falta, está obsoleto, no saludable sin contador o se reinició en el intervalo; los gauges de tasa también durante dos o tres sondeos posteriores al reinicio | +| Metadatos (general) | Operaciones de metadatos por segundo del sistema, todas las permitidas juntas, y gauge de tasa de operaciones para alertas | Algún MDT falta, está obsoleto o se reinició en el intervalo; el gauge de tasa también durante dos o tres sondeos posteriores al reinicio | +| Capacidad, Inodos, Rendimiento OST (por destino) | Usado y disponible, inodos, bytes leídos/escritos y operaciones por segundo | El destino falta, está obsoleto o el nodo no imprimió el valor | +| Capacidad, Operaciones MDT (por destino) | Usado y disponible, inodos, operaciones por segundo por tipo | Igual | + +Reglas de la tabla: + +- **Porcentaje usado** sigue `lfs df`: usado dividido entre usado más disponible, redondeado hacia arriba. +- **Desconocido es un hueco, nunca cero.** Un destino ausente, lectura fallida o valor no impreso se dibuja como hueco. +- Los **contadores** se guardan en bruto como DERIVE con mínimo 0. Un reinicio (disminución, cambio de `start_time`, otro nodo tras conmutación o valor anterior desconocido) hace desconocido exactamente un intervalo. +- **Actualidad.** Un valor es actual hasta un intervalo y medio, retrasado hasta tres y obsoleto después. Los gauges se sirven actuales o retrasados; los contadores y gauges de tasa del resumen solo actuales, para que una lectura perdida sea un hueco y no una línea plana seguida de una tasa doble. +- **Destinos inactivos.** Lustre no imprime un contador que nunca contó desde su inicio. Las sumas lo consideran cero si el destino está presente, en servicio y comunicó sus otros valores en esa lectura; el gráfico por destino sigue mostrando un hueco ([ADR 0013](../../../decisions/0013-absent-counter-lines-count-as-zero-in-sums.md)). +- **Cambios del conjunto de destinos.** Cuando uno entra o sale de una suma, esta es desconocida durante un sondeo para no dibujar todo su historial como un intervalo. +- Los **destinos ausentes** conservan índice, fuentes e historial hasta que un administrador los ignore en el registro. + + +## Actualizar + +1. Haga primero una copia de seguridad (abajo). +2. Sustituya `plugins/pfs` por la nueva versión. Mantenga el nombre. +3. Abra Configuración, Plugins. Cacti muestra la nueva versión; el plugin actualiza esquema, hooks, ámbitos, plantillas y archivos de consulta cuando Cacti vuelve a cargar su configuración (abrir Plugins lo hace). Una actualización interrumpida termina en la próxima carga. El lector no se ejecuta si el esquema está atrasado y registra que debe finalizar la actualización. +4. Si actualiza desde una versión preliminar anterior a los gauges de tasa, conserve el historial necesario de los gráficos Rendimiento y Metadatos; después elimine y vuelva a crear esos gráficos generales. Sus archivos RRD existentes no contienen las nuevas fuentes de tasa. +5. Revise Estado y el registro de Cacti. Los problemas de plantilla o consulta se notifican, no se omiten silenciosamente. + +Se rechaza volver a una versión anterior si el esquema es más reciente que el código; restaure la copia previa a la actualización. + + +## Copias de seguridad y restauración + +Respalde todo lo siguiente conjuntamente, en el mismo momento: + +| Qué | Dónde | +|---|---| +| Tablas del plugin | Todas las `plugin_pfs_*` de la base Cacti (`mysqldump cacti $(mysql -N -e "SHOW TABLES LIKE 'plugin\_pfs\_%'" cacti)`), o la base completa | +| Objetos Cacti | Base de datos: dispositivos de sistemas, fuentes y gráficos, plantillas y ajustes en `settings` (`pfs_*`) | +| Archivos RRD | `/rra` o su directorio RRD | +| Acceso a nodos | En cada sondeador, clave SSH y hosts conocidos de los ajustes. En cada nodo, cuenta lectora, su línea `authorized_keys` y `/usr/local/libexec/pfs-read.sh` | +| Copias de consultas | `/resource/script_server/pfs_osts.xml` y `pfs_mdts.xml`, si se copiaron a mano | + +Para restaurar, detenga sondeadores, restaure base de datos y directorio RRD desde la misma copia, restaure clave y hosts conocidos y arranque los sondeadores. El lector continúa en la siguiente ejecución sin duplicar fuentes: dispositivo, fuentes y RRD se relacionan por sus identificadores y rutas guardados. El primer sondeo tras restaurar dibuja un intervalo de contador desconocido porque no se puede confiar en una tasa que atraviese el hueco. Si el esquema restaurado es anterior al código instalado, el plugin lo detecta y actualiza como se describió. La restauración se prueba con `tests/bin/restore-flow.php`. + + +## Desinstalar + +1. Opcional: exporte el registro desde Administración de sistemas de archivos paralelos. +2. Desactive y desinstale en Configuración, Plugins. +3. Se eliminan hooks, ámbitos y copias de consulta escritas por el plugin que no hayan cambiado. Quitar `poller_bottom` detiene el lector, por lo que no se recolectan valores tras desinstalar: los gráficos conservan historial pero dejan de actualizarse y sus valores nuevos se vuelven desconocidos. Las plantillas importadas permanecen en Cacti como cualquier plantilla. Con **Conservar tablas del plugin al desinstalar** marcado (predeterminado) permanecen las tablas; desmárquelo para borrarlas. + - **Dispositivos.** Por defecto se conserva cada dispositivo con sus fuentes y gráficos. Marque **Eliminar al desinstalar los dispositivos creados por este plugin** en Configuración, Ajustes, Sistemas de archivos paralelos (desactivado por defecto) para que se eliminen los dispositivos creados desde Administración mediante el borrado de dispositivos de Cacti: se eliminan también sus gráficos y fuentes; los RRD solo se borran si lo dispone el ajuste de limpieza RRD de Cacti. El plugin registra cada dispositivo creado, una fila por dispositivo en `plugin_pfs_created_devices`; un dispositivo existente que haya asociado a un sistema nunca figura en ese registro y siempre se conserva, con las consultas y gráficos generales añadidos por la asociación. Un sistema cuyo dispositivo se eliminó pierde esa asociación, para que las tablas conservadas no apunten a dispositivos borrados. Una desinstalación que borra las tablas conserva `plugin_pfs_created_devices` mientras enumere algún dispositivo que siga en Cacti, para poder eliminarlo al reinstalar y desinstalar después; borre esa tabla manualmente si conserva esos dispositivos de forma definitiva. Le corresponde eliminar los dispositivos, fuentes, gráficos y RRD que haya creado usted. +4. En cada nodo quite la línea `authorized_keys` del lector, el script y la cuenta. La desinstalación nunca contacta con nodos de almacenamiento. + + +## Resolución de problemas + +Empiece por Estado: indica nodo, sondeador y causa. Después consulte el registro Cacti filtrado por `PFS`. + +| Síntoma | Causa y solución | +|---|---| +| Un nodo indica «la clave no está en hosts conocidos o cambió» | Agregue o corrija la clave con el nombre exacto del endpoint registrado. Verifique por otro canal una clave cambiada antes de confiar; el lector nunca la acepta solo | +| «respondió sin la delimitación del script fijo» | La clave no está limitada al comando forzado o el comando no es `pfs-read.sh`. Corrija `authorized_keys` | +| «imprimió N parámetros que el plugin no lee» | El nodo ejecuta algo distinto del script incluido. Reinstale `node/pfs-read.sh` | +| «resuelve fuera de las redes permitidas» | Permita la red para ese sondeador en administración o corrija el endpoint | +| Lectura de nodo fallida o parcial | Inaccesible, tiempo agotado o respuesta superior a **Respuesta máxima**. Los destinos conservan sus últimos valores hasta quedar obsoletos, luego desconocidos | +| «el lector del sondeador N no ha completado una ejecución» | No se ejecuta `poller_bottom`, PHP del sondeador es anterior a 8.2 o **Ruta del binario PHP** está vacía. El registro indica cuál | +| Las consultas no listan destinos | Faltan copias de consulta o difieren (véase Archivos de consulta), o aún no terminó una lectura | +| Los contadores por destino siempre son huecos | La cuenta no puede leer `stats` del OST. En Lustre 2.17 está en debugfs ([node-setup.md](node-setup.md)) | +| El rendimiento del sistema es un hueco pero el de destinos se dibuja | Un destino falta, está obsoleto, no saludable o recién reiniciado; los recuentos de ausentes y no saludables en Ocupación indican cuál | +| Los gráficos generales se crean pero están vacíos | El dispositivo se sondea desde otro sondeador que el que lee sus nodos; Estado avisa de la discrepancia | +| El registro muestra `Plugin 'thold': Uncaught TypeError` y Thold está desactivado | Un umbral Thold sobre contador vio un intervalo desconocido; elimine el umbral, reactive Thold en Plugins y consulte [alerting.md](alerting.md#counters-and-thold-182) | diff --git a/docs/i18n/es-ES/README.md b/docs/i18n/es-ES/README.md new file mode 100644 index 0000000..273abd3 --- /dev/null +++ b/docs/i18n/es-ES/README.md @@ -0,0 +1,102 @@ + + + +[English](../../../README.md) | [简体中文](../zh-CN/README.md) | [हिन्दी](../hi-IN/README.md) | [Español (España)](README.md) | [Español (Latinoamérica)](../es-419/README.md) | [العربية](../ar-SA/README.md) + + + +# plugin_pfs + +Un plugin para Cacti 1.2 que incorpora salud y carga de sistemas de archivos paralelos: capacidad y desequilibrio de ocupación entre destinos, rendimiento por destino y tasas de operaciones de metadatos. Lustre es el primer backend; GPFS (IBM Storage Scale) y BeeGFS seguirán mediante una interfaz de backend. Los datos llegan a dispositivos, fuentes y gráficos Cacti ordinarios, por lo que Thold y Maint alertan y suprimen sin cambios. + +> **Estado: hito 4, código completo para fase 1, sin publicar.** Los hitos 2 (base), 3 (observación Lustre) y 4 (alertas y preparación de publicación) están terminados en `main` o en revisión. El plugin se instala, actualiza y desinstala mediante la API de plugins Cacti y rechaza PHP anterior a 8.2. Un lector en segundo plano en cada sondeador lee servidores Lustre por SSH mediante un script fijo de comando forzado ([node/pfs-read.sh](../../../node/pfs-read.sh)) y almacena inventario, condición, capacidad y contadores con su actualidad. Cada sistema se convierte en dispositivo Cacti con consultas OST y MDT, cinco gráficos generales, gráficos por destino bajo demanda y una fuente de resumen para Thold. Thold v1.8.2 y Maint v1.3, sin cambios, alertan y suprimen los gauges de resumen en la ejecución de extremo a extremo; Thold 1.8.2 no admite umbrales sobre contadores ([docs/alerting.md](docs/alerting.md)). Todas las pruebas hasta ahora usan salida de nodo de prueba en un Cacti desechable: no se ha ejecutado contra un nodo Lustre real. Antes de publicar faltan pilotos en sistemas reales ([plan piloto](../../pilot-plan.md)), revisión externa de seguridad ([autorrevisión](../../security-review.md)) y medidas de escala en hardware documentado ([escala](../../research/scale.md)). La versión 0.1.0 está preparada en `INFO` y [CHANGELOG.md](../../../CHANGELOG.md), pero no etiquetada. + + +## Roles de acceso + +| Ámbito | Acceso | +| --- | --- | +| Parallel Filesystem View | Páginas de monitorización existentes. | +| Parallel Filesystem Operator | Monitorización, página Operaciones y confirmaciones personales de clasificación. | +| Parallel Filesystem Admin | Acceso Operator más configuración y acciones administrativas existentes. | + +Tras copiar los archivos de actualización, abra Plugins como administrador para registrar el nuevo ámbito. Asigne expresamente Operator en **Configuración > Usuarios** o en grupos de usuarios. Las actualizaciones conservan los identificadores y concesiones existentes de View y Admin. En cada solicitud, Admin hereda Operator y Operator hereda View; esto no añade concesiones persistentes a usuarios ni grupos. Los ajustes del plugin requieren Parallel Filesystem Admin además del permiso Settings de Cacti. + +Los permisos de dispositivo de Cacti siguen limitando las filas y acciones de cada usuario; los objetos sin asignar requieren un administrador. Credenciales, configuración, asignación, borrado y otros cambios administrativos permanecen en las páginas administrativas. Las confirmaciones duran solo en la sesión del usuario actual, como máximo una hora y mientras siga vigente la misma observación. Las observaciones nuevas o modificadas las invalidan. Nunca marcan una medición fallida como correcta ni suprimen alertas. + + +## Motivo + +Cuando un sistema compartido va lento, las evidencias se reparten entre servidores. Lustre guarda contadores por nodo: `lctl get_param` comunica valores «del nodo local», así que cada servidor de almacenamiento de objetos (OSS) y de metadatos (MDS) solo tiene cifras de sus destinos. Un operador necesita tres respuestas desde lugares distintos: + +- **¿Un destino se llena mientras otros están vacíos?** El desequilibrio influye en dónde se crean archivos y cuándo un destino se queda sin espacio. +- **¿Qué destinos u operaciones están ocupados?** Los contadores de bytes por destino y de operaciones por MDT revelan si la carga depende de datos o metadatos. +- **¿Está actualizada la propia monitorización?** Un gráfico plano solo tranquiliza si el plugin pudo ver los servidores. + +Cacti grafica hosts y aplica umbrales con Thold, y su organización GitHub no tiene repositorio para monitorizar Lustre, GPFS o BeeGFS (búsqueda del 2026-11-14). El plugin cubre esa carencia leyendo valores permitidos y de solo lectura de los nodos y representando cada sistema como dispositivo Cacti cuyos destinos son índices de una consulta. Reutiliza gráficos, permisos, recolectores remotos, Thold y Maint de Cacti en lugar de construir versiones paralelas. + + +## Alcance previsto + +| Fase | Alcance | Hitos | +|---|---|---| +| 0, investigación | Matriz de versiones, decisión de acceso, confirmación del comportamiento original, contadores y conmutación por error, escala | [M1](https://github.com/somethingwithproof/plugin_pfs/milestone/1) | +| 1, observación | Inventario Lustre, capacidad y ocupación, rendimiento OST, tasas MDT, gráficos, alertas Thold, supresión Maint y página de estado | [M2](https://github.com/somethingwithproof/plugin_pfs/milestone/2), [M3](https://github.com/somethingwithproof/plugin_pfs/milestone/3), [M4](https://github.com/somethingwithproof/plugin_pfs/milestone/4) | +| 2, profundidad | Recolectores remotos Cacti, vistas por trabajo y cliente con cantidad acotada de objetos | [M5](https://github.com/somethingwithproof/plugin_pfs/milestone/5) | +| 3, backends | Backends GPFS (IBM Storage Scale) y BeeGFS | [M6](https://github.com/somethingwithproof/plugin_pfs/milestone/6) | + +Fuera de alcance: cualquier escritura, borrado, reinicio o ajuste de nodo o sistema de archivos; motor de alertas propio; demonio o protocolo de red personalizado; fuentes por trabajo; cambios en el núcleo Cacti, Thold o Maint. + + +## Objetivos de compatibilidad + +| Componente | Objetivo | +|---|---| +| Cacti | 1.2.31 o posterior, sin parches del núcleo | +| PHP | 8.2 o posterior; `setup.php` sigue siendo analizable en 8.0 para rechazar entornos no compatibles en lugar de romper la interfaz | +| Lustre | Líneas de versión por fijar en el hito 1; código y manuales revisados hasta ahora en 2.17.0 | +| GPFS, BeeGFS | Fase 3; versiones pendientes de investigación | +| Thold, Maint | No requieren cambios | + + +## Diseño + +- [docs/PLAN.md](../../PLAN.md) contiene el plan completo: arquitectura, hechos de proyectos originales de los que depende (con fuentes y lo aún no verificado), semántica de contadores, modelo de estado, límites de seguridad, cálculos de rendimiento, pruebas y riesgos. +- [docs/operator-guide.md](docs/operator-guide.md) cubre instalación, gráficos y valores, actualización, copias y restauración, desinstalación y resolución de problemas; [docs/alerting.md](docs/alerting.md) cubre Thold y Maint. +- [docs/node-setup.md](docs/node-setup.md) explica cómo preparar un servidor Lustre y un sondeador para el lector. +- [docs/decisions/](../../decisions) contiene los registros de decisiones arquitectónicas tomadas. +- [docs/REQUIREMENTS.md](../../REQUIREMENTS.md) relaciona cada requisito con su incidencia. + +```mermaid +flowchart LR + N[Lustre servers: OSS, MDS] -->|fixed read-only request| S[Node source on the Cacti poller] + S --> R[Reader] + R --> C[(Observation cache)] + C --> SS[Script server input] + SS -->|poller_output| T[Thold and Maint] + SS --> RRD[(Cacti RRDs)] + RRD --> G[Cacti graphs and permissions] +``` + + +## Cómo se sigue el trabajo + +- Los **hitos** siguen los del plan. Cada uno tiene una incidencia épica con sus subincidencias y las evidencias de finalización. +- Las **incidencias** se clasifican por etiqueta: `type: requirement`, `type: research`, `type: decision`, `type: epic`. Las de requisito contienen requisitos numerados y verificables (`REQ-AREA-NNN`) y criterios de aceptación. +- Las **etiquetas** también incluyen `area:`, `phase:`, `priority:` y `status:`. Consulte [CONTRIBUTING.md](../../../CONTRIBUTING.md#labels). +- El [tablero del proyecto](https://github.com/users/somethingwithproof/projects/11) muestra todas las incidencias de los hitos. + + +## Contribuir + +Lea [CONTRIBUTING.md](../../../CONTRIBUTING.md). Los commits requieren firma DCO. El diseño se debate en incidencias; las decisiones abiertas llevan `type: decision`. + + +## Seguridad + +Comunique las vulnerabilidades de forma privada; consulte [SECURITY.md](../../../SECURITY.md). + + +## Licencia + +Licencia Pública General GNU v2.0, la misma que Cacti y sus plugins. Consulte [LICENSE](../../../LICENSE). diff --git a/docs/i18n/es-ES/docs/alerting.md b/docs/i18n/es-ES/docs/alerting.md new file mode 100644 index 0000000..6e08074 --- /dev/null +++ b/docs/i18n/es-ES/docs/alerting.md @@ -0,0 +1,65 @@ + + + +# Alertas con Thold y Maint + +El plugin no tiene motor de alertas. Los umbrales de Thold y las programaciones de Maint funcionan sobre sus fuentes de datos sin cambios ([ADR 0002](../../../decisions/0002-alert-through-cacti-data-sources.md)). Esta página explica qué valores usar, qué se probó y los límites. + + +## Sobre qué crear umbrales + +Utilice los valores de **Resumen de sistema de archivos paralelo**. Cada gráfico general tiene su propia fuente de resumen; cree el umbral desde el gráfico que dibuja el valor: + +| Valor | Gráfico | Ejemplo de umbral | Notas | +|---|---|---|---| +| `fill_spread_pct` | Desequilibrio | Alto 20 (puntos porcentuales) | OST más lleno menos el más vacío | +| `fill_max_pct` | Ocupación | Alto 90 | OST más lleno | +| `targets_missing` | Ocupación o Desequilibrio | Alto 0,5 | Destinos excluidos del resumen: ausentes o sin lectura actual de capacidad | +| `targets_unhealthy` | Ocupación | Alto 0,5 | Destinos cuyas condiciones no indican servicio; desconocido si no se conoce la condición de ninguno | +| `age` | Ocupación | Alto 3 veces el intervalo de sondeo | Segundos desde la observación más antigua del resumen; numérico si alguna vez se observó el sistema, por lo que aumenta mientras un nodo calla | +| `kbytes_avail` | Capacidad | Bajo, en kilobytes | Desconocido si falta cualquier OST; no alerta por una interrupción | +| `read_bytes_rate`, `write_bytes_rate` | Rendimiento | Alto, en bytes por segundo, 2 sondeos | Tasas de lectura y escritura del sistema calculadas por el lector; desconocidas durante dos o tres sondeos tras un reinicio | +| `md_ops_rate` | Operaciones de metadatos | Alto, en operaciones por segundo, 2 sondeos | Tasa de operaciones de metadatos del sistema, calculada del mismo modo | +| `read_bytes`, `write_bytes`, `md_ops` | Rendimiento, Operaciones de metadatos | Ninguno con Thold 1.8.2; use las tasas anteriores | Contadores (DERIVE), solo para gráficos | + +Los gauges por destino (capacidad, inodos) admiten umbrales del mismo modo desde sus gráficos. + + +## Duraciones + +- Configure el disparador de fallo con al menos un sondeo. El lector y el sondeador de Cacti tienen programaciones independientes, por lo que un valor puede tener un intervalo de antigüedad al sondearlo Cacti. +- Un valor desconocido (`U`) nunca supera un umbral alto o bajo. En el código de Thold 1.8.2 sigue la ruta sin superación, por lo que un umbral superado registra un restablecimiento ante un hueco (leído en `thold_check_threshold()`, no probado de extremo a extremo). Un destino ausente aparece en `targets_missing` mientras el resumen es actual. Cuando cesan las lecturas y el resumen queda obsoleto, todos los valores salvo `age`, incluido `targets_missing`, se sirven como `U`; por eso `age` alerta de una interrupción de lectura. Alerte sobre estos indicadores, no sobre un hueco. +- Un reinicio de contador produce un intervalo desconocido en su gráfico y dos o tres sondeos desconocidos en el gauge de tasa correspondiente. +- Los umbrales de tasa deben ser altos, con un disparador de fallo de al menos dos sondeos. La fase 1 no admite umbrales de tasa bajos ("la tasa de escritura cayó por debajo"), porque un sondeo desconocido tras un reinicio los restablece ([ADR 0012](../../../decisions/0012-thold-rate-alerts-high-thresholds-only.md#amendment-2026-11-15)). + + +## Mantenimiento + +Incluya el dispositivo del sistema de archivos en una programación Maint. Thold consulta el dispositivo mediante la función de Maint, por lo que durante ella no cuenta ni notifica superaciones ni registra nada por ellas. La recogida continúa: el lector lee, el sondeador sondea y los RRD guardan valores. Al terminar, una superación persistente cuenta desde cero y notifica después del disparador de fallo. + + +## Contadores y Thold 1.8.2 + +No cree umbrales Thold sobre contadores (`read_bytes`, `write_bytes`, `md_ops` o contadores por destino) con Thold 1.8.2. Cree los umbrales sobre los gauges de tasa. + +El plugin sirve `U` para un intervalo de contador no fiable: reinicio, entrada o salida de un destino de la suma o lectura no actual. Thold 1.8.2 guarda ese `U` como valor bruto anterior de una fuente DERIVE; con el siguiente valor numérico, su cálculo de tasa lanza un `TypeError` de PHP en el procesamiento de salida del sondeador de Cacti. Cacti desactiva Thold y se detiene el procesamiento de salida de ese sondeo. Se observó en la ejecución de extremo a extremo (registro en [research/thold-counters.md](../../../research/thold-counters.md#milestone-4-end-to-end-run)). + +Los gauges de tasa evitan esto: el lector calcula la tasa, Cacti la guarda como GAUGE y Thold compara el nivel sin calcular nada. Un reinicio deja el gauge como `U` durante dos o tres sondeos; Thold lo considera no superado y la prueba de extremo a extremo pasa manteniendo Thold activo. La rama de desarrollo de Thold en `dc76952` (sin publicar) protege la ruta DERIVE; los umbrales de contador podrán reconsiderarse cuando una versión incluya ese cambio. + +Si este error desactivó Thold, elimine el umbral del contador, vuelva a activar Thold en Plugins y cree el umbral sobre el gauge de tasa. + + +## Qué se probó + +`tests/bin/alert-replay.sh` se ejecuta con Thold v1.8.2 (`1eb406bd0f81f3204358cce7bd43c8bb5adc8e4a`) y Maint v1.3 (`cd62de9cc323a4f5a8ac80a8d9dda3c7fa16c470`), sin cambios, en un Cacti desechable 1.2.31 y la rama 1.2.x, con salida de nodo de prueba y ejecuciones reales del sondeador. Los umbrales se guardan mediante `save_thold()` de Thold; la programación Maint son las dos filas que guarda su página de programación. + +| Escenario | Umbral | Resultado | +|---|---|---| +| Desequilibrio de ocupación y después equilibrio | `fill_spread_pct` superior a 20, 1 sondeo | Notifica una vez y registra restablecimiento | +| Un OST desaparece y vuelve | `targets_missing` superior a 0,5, 1 sondeo | Notifica y se restablece | +| El OSS no responde durante 40 segundos | `age` superior a 30, 1 sondeo | Notifica mientras `age` sigue numérico; se restablece al responder el nodo | +| Tasa de escritura muy superior al umbral durante dos sondeos | `write_bytes_rate` superior a 1 GB/s, 2 sondeos | El primero supera sin notificar, el segundo notifica y después se restablece | +| Se reinician los contadores de todos los OST y vuelve un pico de escritura | `write_bytes_rate` | Dos sondeos desconocidos sin superación ni registro y con Thold activo; en el tercero vuelve el valor numérico y el siguiente pico supera, notifica y se restablece | +| Desequilibrio durante una programación Maint, dos sondeos | `fill_spread_pct` | Sin recuento ni registro mientras el RRD guarda el valor; notifica en el sondeo posterior al fin de la programación | + +No probado: entrega de notificaciones (sin servidor de correo), modo demonio de Thold y Maint en un recolector remoto (*en vivo*). diff --git a/docs/i18n/es-ES/docs/node-setup.md b/docs/i18n/es-ES/docs/node-setup.md new file mode 100644 index 0000000..bb65d2a --- /dev/null +++ b/docs/i18n/es-ES/docs/node-setup.md @@ -0,0 +1,68 @@ + + + +# Configuración de nodos + +Cómo preparar un servidor Lustre para que el lector del plugin pueda leerlo ([ADR 0009](../../../decisions/0009-read-nodes-through-a-forced-ssh-command.md)). Nada de esto se ha ejecutado aún en un nodo Lustre real; las comprobaciones reales están en [#20](https://github.com/somethingwithproof/plugin_pfs/issues/20) y el [plan piloto](../../../pilot-plan.md). La instalación en Cacti está en [operator-guide.md](operator-guide.md). + + +## En cada servidor Lustre + +1. Cree una cuenta dedicada sin privilegios para el lector, por ejemplo `pfsread`, sin contraseña ni otro uso. +2. Instale [node/pfs-read.sh](../../../../node/pfs-read.sh) como `/usr/local/libexec/pfs-read.sh`, propiedad de root y modo 0755. No acepta argumentos, solo lee su lista permitida e imprime salida delimitada. +3. Añada la clave pública del lector al `authorized_keys` de esa cuenta con el script como comando forzado y sin permitir nada más: + + ``` + restrict,command="/usr/local/libexec/pfs-read.sh" ssh-ed25519 AAAA... cacti-pfs + ``` + + `restrict` desactiva reenvíos, reenvío de agente, X11 y pseudoterminal. sshd ejecuta el comando forzado en lugar de lo que solicite el cliente, de modo que este no puede ejecutar otra cosa. +4. En Lustre 2.17, los archivos OST `stats` y `recovery_status` están en debugfs, legible solo por root de forma predeterminada. Sin root o un montaje debugfs cuyo modo permita leerlos a la cuenta, esos destinos comunican capacidad y condición, pero sus contadores siguen desconocidos. Qué permitir es una decisión del sitio ([privilegios de nodo](../../../research/node-privileges.md)). + + +## Qué necesita la cuenta lectora por tipo de nodo + +La cuenta lectora solo necesita leer los archivos siguientes: sin reglas sudo, sin grupos aparte del propio, sin escritura en Lustre y sin uso del shell de inicio de sesión salvo el comando forzado. Deducido del código de Lustre ([privilegios de nodo](../../../research/node-privileges.md)); aún no confirmado en un nodo real. + +| Tipo de nodo | Archivos que lee el script | Legibles sin privilegios | +|---|---|---| +| OSS (2.15, 2.16) | `osd-*/-OST*/kbytes*`, `files*` y `obdfilter/-OST*/degraded`, `no_precreate`, `no_create`, `readonly` bajo `/sys/fs/lustre`; `obdfilter/-OST*/stats` y `recovery_status` bajo `/proc/fs/lustre` | Sí | +| OSS (2.17) | Los mismos archivos sysfs; `stats` y `recovery_status` bajo `/sys/kernel/debug/lustre` | Sysfs sí; debugfs solo para root por defecto | +| MDS (los tres) | `osd-*/-MDT*/kbytes*`, `files*` bajo `/sys/fs/lustre`; `mdt/-MDT*/md_stats` bajo `/proc/fs/lustre` | Sí | +| Cualquiera | `version` bajo `/sys/fs/lustre` | Sí | + +Si el sitio concede acceso debugfs en OSS 2.17, prefiera un montaje cuyo `gid` y `mode` permitan leer a un grupo dedicado en lugar de ejecutar el script como root; tenga en cuenta que esto abre todo debugfs a ese grupo. + + +## Confirmar que no se concede nada más + +En cada servidor, como root: + +```sh +id pfsread # only its own group, plus any debugfs group you chose +sudo -l -U pfsread # "not allowed to run sudo" +grep -n pfsread /etc/sudoers /etc/sudoers.d/* 2>/dev/null # nothing +cat ~pfsread/.ssh/authorized_keys # exactly one line, starting with restrict,command="/usr/local/libexec/pfs-read.sh" +ls -l /usr/local/libexec/pfs-read.sh # root-owned, 0755, not writable by pfsread +sshd -T -C user=pfsread,host=cacti,addr= | grep -Ei 'permituserenvironment|authorizedkeyscommand|forcecommand' +``` + +Desde el sondeador, como su usuario, con la clave y el puerto SSH del nodo configurados (sustituya `` por dicho puerto): + +```sh +ssh -F /dev/null -p -i /etc/cacti/pfs/id_ed25519 -o UserKnownHostsFile=/etc/cacti/pfs/known_hosts -o HostKeyAlias= pfsread@
'id; cat /etc/shadow' +``` + +La respuesta debe ser exclusivamente la salida delimitada del script (`#pfs-read 1` … `#pfs-read end`), sin salida del comando solicitado. Cualquier otra cosa indica que el comando forzado no está activo; corríjalo antes de añadir el nodo al registro. Compruebe que `PermitUserEnvironment` sea `no` y que ningún bloque `Match` ni `AuthorizedKeysCommand` dé otra clave o comando a la cuenta. + + +## En cada sondeador Cacti que lea nodos + +1. Coloque la clave privada en **Archivo de clave SSH** (predeterminado `/etc/cacti/pfs/id_ed25519`), legible solo por el usuario del sondeador. El plugin nunca la crea, copia ni imprime. La página de estado avisa si otros usuarios pueden leerla. +2. Coloque la clave de host de cada nodo en **Archivo de hosts conocidos** (predeterminado `/etc/cacti/pfs/known_hosts`) bajo el nombre de endpoint exacto del registro. El lector conecta a la dirección resuelta con `HostKeyAlias` igual al endpoint y rechaza claves ausentes o cambiadas. Nunca acepta una nueva por sí mismo. +3. En el registro, permita las redes que puede alcanzar ese sondeador. Un nodo cuyo endpoint resuelva a cualquier dirección fuera de ellas no se guarda ni se lee. + + +## Opciones SSH + +El lector ejecuta `ssh` con `-F /dev/null` antes de cualquier otra opción, por lo que no lee `~/.ssh/config` del usuario del sondeador ni `ssh_config` del sistema; nada en ellos puede añadir o modificar opciones. Configure valores del sitio en los ajustes del plugin (Ajustes, Sistemas de archivos paralelos): ruta del cliente SSH, archivo de clave, hosts conocidos, tiempo de conexión, tiempo de lectura, tamaño máximo de respuesta, presupuesto del lector y concurrencia. El puerto y el usuario de inicio de sesión se configuran por nodo en el registro. No se admiten opciones fuera de estos ajustes, como un host de salto o un comando proxy. diff --git a/docs/i18n/es-ES/docs/operator-guide.md b/docs/i18n/es-ES/docs/operator-guide.md new file mode 100644 index 0000000..94830b4 --- /dev/null +++ b/docs/i18n/es-ES/docs/operator-guide.md @@ -0,0 +1,124 @@ + + + +# Guía del operador + +Cómo instalar, ejecutar, actualizar, respaldar y eliminar el plugin, y qué significan sus gráficos y valores. La preparación de nodos está en [node-setup.md](node-setup.md); las alertas con Thold y Maint, en [alerting.md](alerting.md). + +Estado: la fase 1 tiene el código completo y solo se ha ejecutado con salida de nodo de prueba en un Cacti desechable. No hay informes de un piloto en un Lustre real ([#57](https://github.com/somethingwithproof/plugin_pfs/issues/57)); hasta entonces, considere cada cifra siguiente un resultado de muestras de prueba. + + +## Requisitos + +| Componente | Requisito | +|---|---| +| Cacti | 1.2.31 o posterior, sin parches del núcleo | +| PHP | 8.2 o posterior en cada host Cacti que ejecute la web o un sondeador. En 8.0 o 8.1 el plugin rechaza activarse y Cacti sigue funcionando | +| Lustre | Servidores accesibles por SSH con el script de lectura forzado; versiones comprobadas en código: 2.15.8, 2.16.1 y 2.17.0 | +| Host del sondeador | Cliente `ssh`, clave privada del lector y archivo de hosts conocidos | + + +## Instalar + +1. Descomprima la versión para que el directorio sea `/plugins/pfs`. Debe llamarse `pfs`; el archivo fuente de GitHub se extrae como `plugin_pfs-` y hay que renombrarlo. +2. En Cacti abra Configuración, Plugins, e instale y active Sistemas de archivos paralelos. La instalación crea tablas, registra hooks y tres ámbitos, importa plantillas de dispositivo, datos y gráficos y copia dos archivos de consulta a Cacti (sección siguiente). +3. Asigne los ámbitos necesarios en Gestión de usuarios: **Parallel Filesystem View** para inventario y actualidad, **Parallel Filesystem Operator** para la página Operaciones y confirmaciones personales de clasificación, y **Parallel Filesystem Admin** para registro y estado. En cada solicitud, Admin hereda Operator y Operator hereda View, sin añadir concesiones persistentes. Los tres respetan los permisos de dispositivo de Cacti. +4. Abra Consola, Estado de sistemas de archivos paralelos. Cada aviso indica qué corregir. Una instalación nueva suele indicar que faltan la clave SSH y los hosts conocidos hasta completar los pasos siguientes. +5. Prepare nodos y sondeador según [node-setup.md](node-setup.md). +6. En Administración de sistemas de archivos paralelos permita las redes de cada sondeador, añada el sistema y después sus nodos (endpoint, puerto, nombre de usuario, rol). No se guarda un nodo cuyo endpoint resuelva fuera de las redes permitidas. +7. Espere un intervalo. El lector se ejecuta desde `poller_bottom` de Cacti en cada sondeador y rellena el inventario. Revise los destinos propuestos en la página del sistema; ignorar uno lo excluye de las consultas y el resumen. +8. Cree el dispositivo del sistema desde administración, o asígnelo a uno existente. El plugin enumera antes lo que añadirá: dispositivo, ambas consultas y cinco gráficos generales. Los gráficos por destino se crean bajo demanda desde Nuevos gráficos de Cacti. + + +### Archivos de consulta de datos + +Cacti solo lee XML de consulta dentro de `/resource`, por lo que se copian `resource/script_server/pfs_osts.xml` y `pfs_mdts.xml` del plugin a `/resource/script_server/`. Se rechaza un enlace simbólico en cualquiera de los destinos y cada archivo se escribe mediante un temporal en el mismo directorio. Solo registra SHA-256 de archivos que escribe: uno existente con el mismo contenido, por ejemplo copiado con los pasos siguientes, se usa pero sigue siendo suyo y no se desinstala. Nunca sustituye archivos ajenos o modificados posteriormente; solo elimina los propios que no han cambiado. + +Si el usuario web no puede escribir allí, la página de estado lo indica y las consultas no pueden listar destinos. Copie una vez con un usuario autorizado, manteniendo lectura para usuarios web y sondeador: + +```sh +cd +install -m 0644 plugins/pfs/resource/script_server/pfs_osts.xml resource/script_server/ +install -m 0644 plugins/pfs/resource/script_server/pfs_mdts.xml resource/script_server/ +``` + +Después pulse **Instalar las plantillas de nuevo** en Estado. El aviso desaparece cuando ambas copias coinciden. Al ser suyas, el plugin no las actualiza ni elimina: repita la copia después de una actualización que cambie algún archivo (Estado avisa si difieren) y elimínelas usted tras desinstalar. + + +## Significado de gráficos y valores + +Cada sistema de archivos es un dispositivo Cacti. Sus destinos OST y MDT son índices de dos consultas del servidor de scripts. Todos los valores vienen de la caché del lector; ningún gráfico, página ni fuente contacta con nodos. + +| Gráfico | Valores | Desconocido cuando | +|---|---|---| +| Ocupación (general) | Máximo, media y mínimo del porcentaje usado OST y máximo del porcentaje usado de inodos por destino; totales de destinos, ausentes, no saludables y segundos desde la observación más antigua del resumen, impresos bajo este gráfico | Porcentajes de capacidad: ningún destino tiene una lectura actual de esa métrica; antigüedad: nunca observado | +| Desequilibrio (general) | Diferencia entre los porcentajes usados OST máximo y mínimo | Ningún OST tiene lectura actual de capacidad | +| Capacidad (general) | Kilobytes totales y disponibles del sistema | Falta cualquier OST o está obsoleto, por lo que el total sería parcial | +| Rendimiento (general) | Bytes leídos y escritos por segundo del sistema y gauges de tasa de lectura y escritura para alertas (bajo el gráfico) | Algún OST falta, está obsoleto, no saludable sin contador o se reinició en el intervalo; los gauges de tasa también durante dos o tres sondeos posteriores al reinicio | +| Metadatos (general) | Operaciones de metadatos por segundo del sistema, todas las permitidas juntas, y gauge de tasa de operaciones para alertas | Algún MDT falta, está obsoleto o se reinició en el intervalo; el gauge de tasa también durante dos o tres sondeos posteriores al reinicio | +| Capacidad, Inodos, Rendimiento OST (por destino) | Usado y disponible, inodos, bytes leídos/escritos y operaciones por segundo | El destino falta, está obsoleto o el nodo no imprimió el valor | +| Capacidad, Operaciones MDT (por destino) | Usado y disponible, inodos, operaciones por segundo por tipo | Igual | + +Reglas de la tabla: + +- **Porcentaje usado** sigue `lfs df`: usado dividido entre usado más disponible, redondeado hacia arriba. +- **Desconocido es un hueco, nunca cero.** Un destino ausente, lectura fallida o valor no impreso se dibuja como hueco. +- Los **contadores** se guardan en bruto como DERIVE con mínimo 0. Un reinicio (disminución, cambio de `start_time`, otro nodo tras conmutación o valor anterior desconocido) hace desconocido exactamente un intervalo. +- **Actualidad.** Un valor es actual hasta un intervalo y medio, retrasado hasta tres y obsoleto después. Los gauges se sirven actuales o retrasados; los contadores y gauges de tasa del resumen solo actuales, para que una lectura perdida sea un hueco y no una línea plana seguida de una tasa doble. +- **Destinos inactivos.** Lustre no imprime un contador que nunca contó desde su inicio. Las sumas lo consideran cero si el destino está presente, en servicio y comunicó sus otros valores en esa lectura; el gráfico por destino sigue mostrando un hueco ([ADR 0013](../../../decisions/0013-absent-counter-lines-count-as-zero-in-sums.md)). +- **Cambios del conjunto de destinos.** Cuando uno entra o sale de una suma, esta es desconocida durante un sondeo para no dibujar todo su historial como un intervalo. +- Los **destinos ausentes** conservan índice, fuentes e historial hasta que un administrador los ignore en el registro. + + +## Actualizar + +1. Haga primero una copia de seguridad (abajo). +2. Sustituya `plugins/pfs` por la nueva versión. Mantenga el nombre. +3. Abra Configuración, Plugins. Cacti muestra la nueva versión; el plugin actualiza esquema, hooks, ámbitos, plantillas y archivos de consulta cuando Cacti vuelve a cargar su configuración (abrir Plugins lo hace). Una actualización interrumpida termina en la próxima carga. El lector no se ejecuta si el esquema está atrasado y registra que debe finalizar la actualización. +4. Si actualiza desde una versión preliminar anterior a los gauges de tasa, conserve el historial necesario de los gráficos Rendimiento y Metadatos; después elimine y vuelva a crear esos gráficos generales. Sus archivos RRD existentes no contienen las nuevas fuentes de tasa. +5. Revise Estado y el registro de Cacti. Los problemas de plantilla o consulta se notifican, no se omiten silenciosamente. + +Se rechaza volver a una versión anterior si el esquema es más reciente que el código; restaure la copia previa a la actualización. + + +## Copias de seguridad y restauración + +Respalde todo lo siguiente conjuntamente, en el mismo momento: + +| Qué | Dónde | +|---|---| +| Tablas del plugin | Todas las `plugin_pfs_*` de la base Cacti (`mysqldump cacti $(mysql -N -e "SHOW TABLES LIKE 'plugin\_pfs\_%'" cacti)`), o la base completa | +| Objetos Cacti | Base de datos: dispositivos de sistemas, fuentes y gráficos, plantillas y ajustes en `settings` (`pfs_*`) | +| Archivos RRD | `/rra` o su directorio RRD | +| Acceso a nodos | En cada sondeador, clave SSH y hosts conocidos de los ajustes. En cada nodo, cuenta lectora, su línea `authorized_keys` y `/usr/local/libexec/pfs-read.sh` | +| Copias de consultas | `/resource/script_server/pfs_osts.xml` y `pfs_mdts.xml`, si se copiaron a mano | + +Para restaurar, detenga sondeadores, restaure base de datos y directorio RRD desde la misma copia, restaure clave y hosts conocidos y arranque los sondeadores. El lector continúa en la siguiente ejecución sin duplicar fuentes: dispositivo, fuentes y RRD se relacionan por sus identificadores y rutas guardados. El primer sondeo tras restaurar dibuja un intervalo de contador desconocido porque no se puede confiar en una tasa que atraviese el hueco. Si el esquema restaurado es anterior al código instalado, el plugin lo detecta y actualiza como se describió. La restauración se prueba con `tests/bin/restore-flow.php`. + + +## Desinstalar + +1. Opcional: exporte el registro desde Administración de sistemas de archivos paralelos. +2. Desactive y desinstale en Configuración, Plugins. +3. Se eliminan hooks, ámbitos y copias de consulta escritas por el plugin que no hayan cambiado. Quitar `poller_bottom` detiene el lector, por lo que no se recogen valores tras desinstalar: los gráficos conservan historial pero dejan de actualizarse y sus valores nuevos se vuelven desconocidos. Las plantillas importadas permanecen en Cacti como cualquier plantilla. Con **Conservar tablas del plugin al desinstalar** marcado (predeterminado) permanecen las tablas; desmárquelo para borrarlas. + - **Dispositivos.** Por defecto se conserva cada dispositivo con sus fuentes y gráficos. Marque **Eliminar al desinstalar los dispositivos creados por este plugin** en Configuración, Ajustes, Sistemas de archivos paralelos (desactivado por defecto) para que se eliminen los dispositivos creados desde Administración mediante el borrado de dispositivos de Cacti: se eliminan también sus gráficos y fuentes; los RRD solo se borran si lo dispone el ajuste de limpieza RRD de Cacti. El plugin registra cada dispositivo creado, una fila por dispositivo en `plugin_pfs_created_devices`; un dispositivo existente que haya asociado a un sistema nunca figura en ese registro y siempre se conserva, con las consultas y gráficos generales añadidos por la asociación. Un sistema cuyo dispositivo se eliminó pierde esa asociación, para que las tablas conservadas no apunten a dispositivos borrados. Una desinstalación que borra las tablas conserva `plugin_pfs_created_devices` mientras enumere algún dispositivo que siga en Cacti, para poder eliminarlo al reinstalar y desinstalar después; borre esa tabla manualmente si conserva esos dispositivos de forma definitiva. Le corresponde eliminar los dispositivos, fuentes, gráficos y RRD que haya creado usted. +4. En cada nodo quite la línea `authorized_keys` del lector, el script y la cuenta. La desinstalación nunca contacta con nodos de almacenamiento. + + +## Resolución de problemas + +Empiece por Estado: indica nodo, sondeador y causa. Después consulte el registro Cacti filtrado por `PFS`. + +| Síntoma | Causa y solución | +|---|---| +| Un nodo indica «la clave no está en hosts conocidos o cambió» | Añada o corrija la clave con el nombre exacto del endpoint registrado. Verifique por otro canal una clave cambiada antes de confiar; el lector nunca la acepta solo | +| «respondió sin la delimitación del script fijo» | La clave no está limitada al comando forzado o el comando no es `pfs-read.sh`. Corrija `authorized_keys` | +| «imprimió N parámetros que el plugin no lee» | El nodo ejecuta algo distinto del script incluido. Reinstale `node/pfs-read.sh` | +| «resuelve fuera de las redes permitidas» | Permita la red para ese sondeador en administración o corrija el endpoint | +| Lectura de nodo fallida o parcial | Inaccesible, tiempo agotado o respuesta superior a **Respuesta máxima**. Los destinos conservan sus últimos valores hasta quedar obsoletos, luego desconocidos | +| «el lector del sondeador N no ha completado una ejecución» | No se ejecuta `poller_bottom`, PHP del sondeador es anterior a 8.2 o **Ruta del binario PHP** está vacía. El registro indica cuál | +| Las consultas no listan destinos | Faltan copias de consulta o difieren (véase Archivos de consulta), o aún no terminó una lectura | +| Los contadores por destino siempre son huecos | La cuenta no puede leer `stats` del OST. En Lustre 2.17 está en debugfs ([node-setup.md](node-setup.md)) | +| El rendimiento del sistema es un hueco pero el de destinos se dibuja | Un destino falta, está obsoleto, no saludable o recién reiniciado; los recuentos de ausentes y no saludables en Ocupación indican cuál | +| Los gráficos generales se crean pero están vacíos | El dispositivo se sondea desde otro sondeador que el que lee sus nodos; Estado avisa de la discrepancia | +| El registro muestra `Plugin 'thold': Uncaught TypeError` y Thold está desactivado | Un umbral Thold sobre contador vio un intervalo desconocido; elimine el umbral, reactive Thold en Plugins y consulte [alerting.md](alerting.md#counters-and-thold-182) | diff --git a/docs/i18n/hi-IN/README.md b/docs/i18n/hi-IN/README.md new file mode 100644 index 0000000..d11b783 --- /dev/null +++ b/docs/i18n/hi-IN/README.md @@ -0,0 +1,102 @@ + + + +[English](../../../README.md) | [简体中文](../zh-CN/README.md) | [हिन्दी](README.md) | [Español (España)](../es-ES/README.md) | [Español (Latinoamérica)](../es-419/README.md) | [العربية](../ar-SA/README.md) + + + +# plugin_pfs + +Cacti 1.2 प्लगइन जो समानांतर फ़ाइल सिस्टम का स्वास्थ्य और लोड लाता है: टारगेटों की क्षमता और भराव असंतुलन, प्रति-टारगेट थ्रूपुट तथा मेटाडेटा ऑपरेशन दर। Lustre पहला बैकएंड है; GPFS (IBM Storage Scale) और BeeGFS एक बैकएंड इंटरफ़ेस से बाद में आएँगे। डेटा साधारण Cacti डिवाइस, डेटा स्रोत और ग्राफ़ में जाता है, इसलिए Thold तथा Maint बिना बदलाव अलर्ट और उनका दमन करते हैं। + +> **स्थिति: माइलस्टोन 4, चरण 1 का कोड पूरा, रिलीज़ नहीं।** माइलस्टोन 2 (आधार), 3 (Lustre अवलोकन) और 4 (अलर्ट और रिलीज़ तैयारी) `main` पर पूरे या समीक्षा में हैं। प्लगइन Cacti API से इंस्टॉल, अपग्रेड और अनइंस्टॉल होता है तथा PHP 8.2 से नीचे अस्वीकार करता है। हर पोलर का बैकग्राउंड रीडर निश्चित अनिवार्य-कमांड स्क्रिप्ट ([node/pfs-read.sh](../../../node/pfs-read.sh)) द्वारा SSH से Lustre सर्वर पढ़ता और सूची, स्थिति, क्षमता तथा काउंटर उनकी ताज़गी सहित कैश करता है। हर फ़ाइल सिस्टम एक Cacti डिवाइस बनता है, OST/MDT क्वेरी, पाँच अवलोकन ग्राफ़, माँग पर प्रति-टारगेट ग्राफ़ और Thold सारांश स्रोत सहित। अपरिवर्तित Thold v1.8.2 तथा Maint v1.3 संपूर्ण रन में सारांश gauge पर अलर्ट और दमन करते हैं; Thold 1.8.2 में काउंटर थ्रेशोल्ड समर्थित नहीं ([docs/alerting.md](docs/alerting.md))। अभी तक सभी परीक्षण अस्थायी Cacti में फ़िक्स्चर नोड आउटपुट पर हैं: असली Lustre नोड पर प्लगइन नहीं चला। रिलीज़ से पहले असली फ़ाइल सिस्टम पायलट ([पायलट योजना](../../pilot-plan.md)), बाहरी सुरक्षा समीक्षा ([स्व-समीक्षा](../../security-review.md)) और दस्तावेज़ित हार्डवेयर पर स्केल मापन ([पैमाना](../../research/scale.md)) बाकी हैं। संस्करण 0.1.0, `INFO` और [CHANGELOG.md](../../../CHANGELOG.md) में तैयार है पर टैग नहीं हुआ। + + +## पहुँच भूमिकाएँ + +| Realm | पहुँच | +| --- | --- | +| Parallel Filesystem View | मौजूदा निगरानी पृष्ठ। | +| Parallel Filesystem Operator | निगरानी के साथ ऑपरेशन्स पृष्ठ और व्यक्तिगत ट्रायेज स्वीकृतियाँ। | +| Parallel Filesystem Admin | Operator पहुँच के साथ मौजूदा कॉन्फ़िगरेशन और प्रशासनिक कार्रवाइयाँ। | + +अपग्रेड फ़ाइलें कॉपी करने के बाद प्रशासक के रूप में प्लगइन पृष्ठ खोलकर नया realm दर्ज करें। **कॉन्फ़िगरेशन > उपयोगकर्ता** या उपयोगकर्ता समूह में Operator realm स्पष्ट रूप से दें। अपग्रेड मौजूदा View और Admin realm ID तथा अनुमति बनाए रखते हैं। हर अनुरोध में Admin को Operator और Operator को View पहुँच विरासत में मिलती है; इससे उपयोगकर्ता या समूह में स्थायी अनुमति नहीं जुड़ती। प्लगइन सेटिंग के लिए Cacti Settings अनुमति के अतिरिक्त Parallel Filesystem Admin भी चाहिए। + +Cacti डिवाइस अनुमतियाँ हर उपयोगकर्ता की पंक्तियाँ और कार्रवाइयाँ सीमित करती रहती हैं; बिना मैप किए ऑब्जेक्ट को प्रशासक चाहिए। क्रेडेंशियल, कॉन्फ़िगरेशन, मैपिंग, हटाना और अन्य प्रशासनिक बदलाव प्रशासनिक पृष्ठों पर रहते हैं। स्वीकृतियाँ केवल वर्तमान उपयोगकर्ता सत्र में, अधिकतम एक घंटे और उसी अवलोकन के ताज़ा रहने तक रहती हैं। नया या बदला अवलोकन उन्हें अमान्य करता है। वे विफल मापन को स्वस्थ नहीं बनातीं और अलर्ट नहीं दबातीं। + + +## कारण + +साझा फ़ाइल सिस्टम धीमा हो तो प्रमाण सर्वरों में फैले होते हैं। Lustre काउंटर प्रति नोड रखता है: `lctl get_param` «स्थानीय नोड» के मान देता है, इसलिए हर ऑब्जेक्ट स्टोरेज सर्वर (OSS) और मेटाडेटा सर्वर (MDS) के पास अपने टारगेट के आँकड़े ही हैं। जाँच करने वाले ऑपरेटर को अलग जगहों से तीन उत्तर चाहिए: + +- **क्या एक टारगेट भर रहा है और बाकी खाली हैं?** भराव असंतुलन नए फ़ाइलों के स्थान और किसी टारगेट की जगह खत्म होने का समय बदलता है। +- **कौन से टारगेट या ऑपरेशन व्यस्त हैं?** प्रति-टारगेट बाइट और प्रति-MDT ऑपरेशन काउंटर दिखाते हैं कि लोड डेटा पर निर्भर है या मेटाडेटा पर। +- **क्या निगरानी खुद वर्तमान है?** सपाट ग्राफ़ तभी भरोसेमंद है जब प्लगइन सर्वर देख पाया हो। + +Cacti होस्ट ग्राफ़ और Thold थ्रेशोल्ड देता है, और Cacti GitHub संगठन में Lustre, GPFS या BeeGFS निगरानी रिपॉज़िटरी नहीं है (खोज 2026-11-14)। प्लगइन स्टोरेज नोड से अनुमति सूची के केवल-पढ़ने वाले मान लेकर और हर फ़ाइल सिस्टम को Cacti डिवाइस, उसके टारगेटों को डेटा क्वेरी इंडेक्स बनाकर कमी भरता है। यह Cacti ग्राफ़, अनुमति, दूरस्थ कलेक्टर, Thold और Maint का पुनः उपयोग करता है, समानांतर संस्करण नहीं बनाता। + + +## नियोजित दायरा + +| चरण | दायरा | माइलस्टोन | +|---|---|---| +| 0, शोध | रिलीज़ मैट्रिक्स, नोड पहुँच निर्णय, मूल व्यवहार पुष्टि, काउंटर और फ़ेलओवर व्यवहार, स्केल मापन | [M1](https://github.com/somethingwithproof/plugin_pfs/milestone/1) | +| 1, अवलोकन | Lustre सूची, क्षमता/भराव, OST थ्रूपुट, MDT दर, ग्राफ़, Thold अलर्ट, Maint दमन, स्वास्थ्य पृष्ठ | [M2](https://github.com/somethingwithproof/plugin_pfs/milestone/2), [M3](https://github.com/somethingwithproof/plugin_pfs/milestone/3), [M4](https://github.com/somethingwithproof/plugin_pfs/milestone/4) | +| 2, विस्तार | Cacti दूरस्थ कलेक्टर, सीमित ऑब्जेक्ट संख्या में जॉब और क्लाइंट स्तर के व्यू | [M5](https://github.com/somethingwithproof/plugin_pfs/milestone/5) | +| 3, बैकएंड | GPFS (IBM Storage Scale) और BeeGFS बैकएंड | [M6](https://github.com/somethingwithproof/plugin_pfs/milestone/6) | + +दायरे से बाहर: नोड या फ़ाइल सिस्टम पर लिखना, साफ़ करना, रीसेट या ट्यूनिंग; अपना अलर्ट इंजन; कस्टम डेमन या नेटवर्क प्रोटोकॉल; प्रति-जॉब डेटा स्रोत; Cacti कोर, Thold या Maint में बदलाव। + + +## अनुकूलता लक्ष्य + +| घटक | लक्ष्य | +|---|---| +| Cacti | 1.2.31 या नया, कोर पैच नहीं | +| PHP | 8.2 या नया; `setup.php` 8.0 पर पार्स होने योग्य ताकि असमर्थित रनटाइम UI तोड़ने के बजाय अस्वीकृति दे | +| Lustre | रिलीज़ श्रृंखला माइलस्टोन 1 में तय होगी; अभी जाँचे स्रोत और मैनुअल 2.17.0 के हैं | +| GPFS, BeeGFS | चरण 3; रिलीज़ शोध में तय होंगी | +| Thold, Maint | बदलाव नहीं चाहिए | + + +## डिज़ाइन + +- [docs/PLAN.md](../../PLAN.md) पूरी योजना है: आर्किटेक्चर, निर्भर मूल परियोजनाओं के तथ्य (स्रोत और अभी अपुष्ट बातें), काउंटर अर्थ, स्थिति मॉडल, सुरक्षा सीमाएँ, प्रदर्शन गणना, परीक्षण और जोखिम। +- [docs/operator-guide.md](docs/operator-guide.md) में इंस्टॉल, ग्राफ़/मान, अपग्रेड, बैकअप/बहाली, अनइंस्टॉल और समस्या निवारण हैं; [docs/alerting.md](docs/alerting.md) में Thold और Maint हैं। +- [docs/node-setup.md](docs/node-setup.md) रीडर के लिए Lustre सर्वर तथा पोलर तैयार करना बताता है। +- [docs/decisions/](../../decisions) में लिए गए वास्तुकला निर्णय हैं। +- [docs/REQUIREMENTS.md](../../REQUIREMENTS.md) हर आवश्यकता ID को मुद्दे से जोड़ता है। + +```mermaid +flowchart LR + N[Lustre servers: OSS, MDS] -->|fixed read-only request| S[Node source on the Cacti poller] + S --> R[Reader] + R --> C[(Observation cache)] + C --> SS[Script server input] + SS -->|poller_output| T[Thold and Maint] + SS --> RRD[(Cacti RRDs)] + RRD --> G[Cacti graphs and permissions] +``` + + +## काम का ट्रैक रखना + +- **माइलस्टोन** योजना का पालन करते हैं। हर एक का एपिक मुद्दा उपमुद्दे और पूरा होने के प्रमाण बताता है। +- **मुद्दे** लेबल से वर्गीकृत हैं: `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/11) सभी माइलस्टोन के मुद्दे दिखाता है। + + +## योगदान + +[CONTRIBUTING.md](../../../CONTRIBUTING.md) पढ़ें। कमिट को DCO साइन-ऑफ़ चाहिए। डिज़ाइन चर्चा मुद्दों में होती है; खुले निर्णयों पर `type: decision` लेबल है। + + +## सुरक्षा + +कमज़ोरियाँ निजी रूप से रिपोर्ट करें; [SECURITY.md](../../../SECURITY.md) देखें। + + +## लाइसेंस + +GNU General Public License v2.0, Cacti और उसके प्लगइन वाला ही लाइसेंस। [LICENSE](../../../LICENSE) देखें। diff --git a/docs/i18n/hi-IN/docs/alerting.md b/docs/i18n/hi-IN/docs/alerting.md new file mode 100644 index 0000000..9cc28d0 --- /dev/null +++ b/docs/i18n/hi-IN/docs/alerting.md @@ -0,0 +1,65 @@ + + + +# Thold और Maint के साथ अलर्ट + +प्लगइन का अपना अलर्ट इंजन नहीं है। Thold थ्रेशोल्ड और Maint शेड्यूल उसके डेटा स्रोतों पर बिना बदलाव काम करते हैं ([ADR 0002](../../../decisions/0002-alert-through-cacti-data-sources.md))। यह पृष्ठ थ्रेशोल्ड योग्य मान, परीक्षण और सीमाएँ बताता है। + + +## किन मानों पर थ्रेशोल्ड लगाएँ + +**समानांतर फ़ाइल सिस्टम सारांश** के मान उपयोग करें। हर अवलोकन ग्राफ़ का अपना सारांश डेटा स्रोत है, इसलिए जिस ग्राफ़ में मान है उसी से थ्रेशोल्ड बनाएँ: + +| मान | ग्राफ़ | थ्रेशोल्ड उदाहरण | टिप्पणी | +|---|---|---|---| +| `fill_spread_pct` | असंतुलन | उच्च 20 (प्रतिशत अंक) | सबसे भरा OST घटा सबसे खाली | +| `fill_max_pct` | भराव | उच्च 90 | सबसे भरा OST | +| `targets_missing` | भराव या असंतुलन | उच्च 0.5 | सारांश से बाहर टारगेट: गायब या वर्तमान क्षमता पढ़ाई नहीं | +| `targets_unhealthy` | भराव | उच्च 0.5 | स्थिति फ़्लैग सेवा में नहीं; किसी टारगेट की स्थिति ज्ञात न हो तो अज्ञात | +| `age` | भराव | उच्च, पोल अंतराल का 3 गुना | सारांश के सबसे पुराने अवलोकन के बाद सेकंड; सिस्टम कभी देखा गया हो तो संख्यात्मक, इसलिए नोड चुप रहे तो बढ़ता है | +| `kbytes_avail` | क्षमता | निम्न, किलोबाइट में | कोई OST गायब हो तो अज्ञात, इसलिए आउटेज पर अलर्ट नहीं | +| `read_bytes_rate`, `write_bytes_rate` | थ्रूपुट | उच्च, बाइट प्रति सेकंड, 2 पोल | रीडर द्वारा गणना की गई सिस्टम की पढ़ने/लिखने की दर; रीसेट के बाद दो या तीन पोल अज्ञात | +| `md_ops_rate` | मेटाडेटा ऑपरेशन | उच्च, ऑपरेशन प्रति सेकंड, 2 पोल | सिस्टम मेटाडेटा ऑपरेशन दर, उसी तरह गणना की गई | +| `read_bytes`, `write_bytes`, `md_ops` | थ्रूपुट, मेटाडेटा ऑपरेशन | Thold 1.8.2 में नहीं; ऊपर की दरें चुनें | काउंटर (DERIVE), केवल ग्राफ़ के लिए | + +प्रति-टारगेट gauge (क्षमता, inode) पर उनके ग्राफ़ से उसी तरह थ्रेशोल्ड लग सकते हैं। + + +## अवधि + +- विफलता ट्रिगर कम से कम एक पोल रखें। रीडर और Cacti पोलर अलग शेड्यूल पर चलते हैं, इसलिए Cacti के पढ़ते समय मान एक अंतराल पुराना हो सकता है। +- अज्ञात मान (`U`) कभी उच्च या निम्न थ्रेशोल्ड नहीं तोड़ता। Thold 1.8.2 स्रोत में वह गैर-उल्लंघन शाखा लेता है, इसलिए टूटा थ्रेशोल्ड अंतराल पर बहाली दर्ज करता है (`thold_check_threshold()` में पढ़ा गया, संपूर्ण परीक्षण नहीं हुआ)। सारांश वर्तमान हो तो गायब टारगेट `targets_missing` में दिखता है। पढ़ाई बंद होकर सारांश पुराना हो तो `age` छोड़कर सभी मान, `targets_missing` सहित, `U` दिए जाते हैं; इसलिए पढ़ने के आउटेज पर `age` अलर्ट करता है। अंतराल के बजाय इन संकेतकों पर अलर्ट करें। +- काउंटर रीसेट उसके ग्राफ़ में एक अज्ञात अंतराल बनाता है और संबंधित दर gauge में दो या तीन अज्ञात पोल। +- दर थ्रेशोल्ड उच्च होने चाहिए और विफलता ट्रिगर कम से कम दो पोल होना चाहिए। चरण 1 में निम्न दर थ्रेशोल्ड ("लेखन दर नीचे गिरी") समर्थित नहीं हैं क्योंकि रीसेट के बाद अज्ञात पोल उन्हें बहाल करता है ([ADR 0012](../../../decisions/0012-thold-rate-alerts-high-thresholds-only.md#amendment-2026-11-15))। + + +## रखरखाव + +फ़ाइल सिस्टम डिवाइस को Maint शेड्यूल में रखें। Thold, Maint के अपने फ़ंक्शन से डिवाइस जाँचता है, इसलिए शेड्यूल में उल्लंघन न गिना जाता है न सूचना दी जाती है और Thold कुछ लॉग नहीं करता। संग्रह जारी रहता है: रीडर पढ़ता, पोलर पोल करता और RRD मान रिकॉर्ड करते हैं। शेड्यूल समाप्त होने पर बचा उल्लंघन शून्य से गिना जाता है और विफलता ट्रिगर के बाद सूचना देता है। + + +## काउंटर और Thold 1.8.2 + +Thold 1.8.2 में काउंटर मान (`read_bytes`, `write_bytes`, `md_ops` या प्रति-टारगेट काउंटर) पर Thold थ्रेशोल्ड न बनाएँ। इसके बजाय दर gauge पर थ्रेशोल्ड बनाएँ। + +प्लगइन अविश्वसनीय काउंटर अंतराल को `U` देता है: रीसेट, योग में टारगेट जुड़ना या निकलना अथवा पढ़ाई वर्तमान न होना। Thold 1.8.2 इस `U` को DERIVE स्रोत के पिछले कच्चे मान के रूप में रखता है और अगले संख्यात्मक मान पर दर गणना Cacti पोलर आउटपुट प्रोसेसिंग में PHP `TypeError` देती है। फिर Cacti Thold बंद करता है और उस पोल की आउटपुट प्रोसेसिंग रुकती है। संपूर्ण रन में यह देखा गया (लॉग [research/thold-counters.md](../../../research/thold-counters.md#milestone-4-end-to-end-run) में)। + +दर gauge इससे बचाते हैं: रीडर दर गणना करता है, Cacti उसे GAUGE रखता है और Thold बिना गणना स्तर की तुलना करता है। रीसेट gauge को दो या तीन पोल `U` करता है, जिसे Thold गैर-उल्लंघन मानता है; संपूर्ण रन में इससे गुजरते हुए Thold सक्षम रहा। Thold विकास शाखा का `dc76952` (रिलीज़ नहीं) DERIVE रास्ते को सुरक्षित करता है; बदलाव वाली रिलीज़ आने पर काउंटर थ्रेशोल्ड पर फिर विचार किया जा सकता है। + +इस त्रुटि से Thold बंद हुआ हो तो काउंटर थ्रेशोल्ड हटाएँ, प्लगइन पृष्ठ पर Thold फिर सक्षम करें और दर gauge पर थ्रेशोल्ड बनाएँ। + + +## क्या परीक्षण हुआ + +`tests/bin/alert-replay.sh`, अपरिवर्तित Thold v1.8.2 (`1eb406bd0f81f3204358cce7bd43c8bb5adc8e4a`) और Maint v1.3 (`cd62de9cc323a4f5a8ac80a8d9dda3c7fa16c470`) के साथ अस्थायी Cacti 1.2.31 और 1.2.x शाखा पर चलता है, फ़िक्स्चर नोड आउटपुट और असली पोलर रन से। थ्रेशोल्ड Thold के `save_thold()` से सहेजे जाते हैं; Maint शेड्यूल उसकी पृष्ठ द्वारा सहेजी दो पंक्तियाँ हैं। + +| परिदृश्य | थ्रेशोल्ड | परिणाम | +|---|---|---| +| भराव असंतुलन, फिर संतुलन | `fill_spread_pct` 20 से ऊपर, 1 पोल | एक सूचना, फिर बहाली लॉग | +| OST गायब, फिर वापस | `targets_missing` 0.5 से ऊपर, 1 पोल | सूचना, फिर बहाली | +| OSS 40 सेकंड जवाब नहीं देता | `age` 30 से ऊपर, 1 पोल | `age` संख्यात्मक रहते सूचना; जवाब लौटे तो बहाली | +| दो पोल तक लेखन दर सीमा से बहुत ऊपर | `write_bytes_rate` 1 GB/s से ऊपर, 2 पोल | पहला उल्लंघन बिना सूचना, दूसरा सूचना, फिर बहाली | +| हर OST का काउंटर रीसेट, फिर लेखन दर दोबारा बढ़ती है | `write_bytes_rate` | दो पोल अज्ञात, न उल्लंघन न लॉग, Thold सक्षम रहता है; तीसरे में दर फिर संख्या है और अगला उछाल उल्लंघन, सूचना और बहाली करता है | +| Maint शेड्यूल में दो पोल असंतुलन | `fill_spread_pct` | गिनती और लॉग नहीं, RRD मान रखता है; शेड्यूल के बाद अगले पोल पर सूचना | + +परीक्षण नहीं हुआ: नोटिफ़िकेशन पहुँचाना (मेल सर्वर नहीं), Thold डेमन मोड और दूरस्थ डेटा कलेक्टर पर Maint (*वास्तविक वातावरण*)। diff --git a/docs/i18n/hi-IN/docs/node-setup.md b/docs/i18n/hi-IN/docs/node-setup.md new file mode 100644 index 0000000..660402d --- /dev/null +++ b/docs/i18n/hi-IN/docs/node-setup.md @@ -0,0 +1,68 @@ + + + +# नोड सेटअप + +Lustre सर्वर तैयार करने का तरीका ताकि प्लगइन का रीडर उसे पढ़ सके ([ADR 0009](../../../decisions/0009-read-nodes-through-a-forced-ssh-command.md))। यहाँ की कोई प्रक्रिया अभी असली Lustre नोड पर नहीं चली; वास्तविक जाँच [#20](https://github.com/somethingwithproof/plugin_pfs/issues/20) और [पायलट योजना](../../../pilot-plan.md) में हैं। Cacti में इंस्टॉल के लिए [operator-guide.md](operator-guide.md) देखें। + + +## हर Lustre सर्वर पर + +1. रीडर के लिए अलग, बिना विशेषाधिकार वाला खाता बनाएँ, जैसे `pfsread`, बिना पासवर्ड और किसी अन्य उपयोग के। +2. [node/pfs-read.sh](../../../../node/pfs-read.sh) को `/usr/local/libexec/pfs-read.sh` पर root स्वामित्व और 0755 मोड में इंस्टॉल करें। यह आर्ग्युमेंट नहीं लेता, केवल अनुमति सूची पढ़ता और सीमाचिह्न वाला आउटपुट देता है। +3. रीडर की सार्वजनिक कुंजी खाते के `authorized_keys` में जोड़ें, स्क्रिप्ट को अनिवार्य कमांड बनाएँ और कुछ और अनुमति न दें: + + ``` + restrict,command="/usr/local/libexec/pfs-read.sh" ssh-ed25519 AAAA... cacti-pfs + ``` + + `restrict` फ़ॉरवर्डिंग, एजेंट फ़ॉरवर्डिंग, X11 और छद्म टर्मिनल बंद करता है। क्लाइंट जो भी माँगे, sshd उसके स्थान पर अनिवार्य कमांड चलाता है, इसलिए क्लाइंट कुछ और नहीं चला सकता। +4. Lustre 2.17 में OST `stats` और `recovery_status` फ़ाइलें debugfs में हैं, जिन्हें डिफ़ॉल्ट रूप से केवल root पढ़ सकता है। root या खाते को पढ़ने देने वाले debugfs माउंट मोड के बिना वे टारगेट क्षमता और स्थिति देते हैं लेकिन काउंटर अज्ञात रहते हैं। क्या अनुमति देना है, यह साइट का निर्णय है ([नोड विशेषाधिकार](../../../research/node-privileges.md))। + + +## नोड प्रकार के अनुसार रीडर खाते की आवश्यकताएँ + +खाते को केवल नीचे की फ़ाइलें पढ़नी हैं: sudo नियम नहीं, अपने समूह के अलावा सदस्यता नहीं, Lustre में कहीं लेखन नहीं और अनिवार्य कमांड के अलावा लॉगिन शेल उपयोग नहीं। Lustre स्रोत से निकाला गया ([नोड विशेषाधिकार](../../../research/node-privileges.md)); असली नोड पर अभी पुष्टि नहीं हुई। + +| नोड प्रकार | स्क्रिप्ट की पढ़ी फ़ाइलें | बिना विशेषाधिकार के पठनीय | +|---|---|---| +| OSS (2.15, 2.16) | `/sys/fs/lustre` के अंतर्गत `osd-*/-OST*/kbytes*`, `files*` और `obdfilter/-OST*/degraded`, `no_precreate`, `no_create`, `readonly`; `/proc/fs/lustre` में `obdfilter/-OST*/stats` तथा `recovery_status` | हाँ | +| OSS (2.17) | वही sysfs फ़ाइलें; `/sys/kernel/debug/lustre` में `stats` और `recovery_status` | Sysfs हाँ; debugfs डिफ़ॉल्ट में केवल root | +| MDS (तीनों) | `/sys/fs/lustre` में `osd-*/-MDT*/kbytes*`, `files*`; `/proc/fs/lustre` में `mdt/-MDT*/md_stats` | हाँ | +| सभी | `/sys/fs/lustre` में `version` | हाँ | + +साइट 2.17 OSS पर debugfs पहुँच दे तो स्क्रिप्ट root से चलाने के बजाय ऐसा debugfs माउंट चुनें जिसके `gid` और `mode` अलग समूह को पढ़ने दें; ध्यान रखें इससे पूरा debugfs उस समूह के लिए खुलता है। + + +## पुष्टि करें कि अतिरिक्त अनुमति नहीं मिली + +हर सर्वर पर root के रूप में: + +```sh +id pfsread # only its own group, plus any debugfs group you chose +sudo -l -U pfsread # "not allowed to run sudo" +grep -n pfsread /etc/sudoers /etc/sudoers.d/* 2>/dev/null # nothing +cat ~pfsread/.ssh/authorized_keys # exactly one line, starting with restrict,command="/usr/local/libexec/pfs-read.sh" +ls -l /usr/local/libexec/pfs-read.sh # root-owned, 0755, not writable by pfsread +sshd -T -C user=pfsread,host=cacti,addr= | grep -Ei 'permituserenvironment|authorizedkeyscommand|forcecommand' +``` + +पोलर से, पोलर उपयोगकर्ता के रूप में, कॉन्फ़िगर की गई कुंजी और नोड के SSH पोर्ट का उपयोग करें (`` को उस पोर्ट से बदलें): + +```sh +ssh -F /dev/null -p -i /etc/cacti/pfs/id_ed25519 -o UserKnownHostsFile=/etc/cacti/pfs/known_hosts -o HostKeyAlias= pfsread@
'id; cat /etc/shadow' +``` + +उत्तर केवल पढ़ने वाली स्क्रिप्ट का सीमाचिह्न वाला आउटपुट (`#pfs-read 1` … `#pfs-read end`) हो, माँगे गए कमांड का कुछ नहीं। अन्य आउटपुट का अर्थ अनिवार्य कमांड लागू नहीं है; नोड रजिस्ट्री में जोड़ने से पहले ठीक करें। जाँचें कि `PermitUserEnvironment`, `no` हो और कोई `Match` ब्लॉक या `AuthorizedKeysCommand` खाते को दूसरी कुंजी या कमांड न देता हो। + + +## नोड पढ़ने वाले हर Cacti पोलर पर + +1. निजी कुंजी **SSH कुंजी फ़ाइल** के पथ पर रखें (डिफ़ॉल्ट `/etc/cacti/pfs/id_ed25519`), केवल पोलर उपयोगकर्ता पढ़ सके। प्लगइन इसे कभी बनाता, कॉपी या छापता नहीं। दूसरे उपयोगकर्ता पढ़ सकें तो स्वास्थ्य पृष्ठ चेतावनी देता है। +2. हर नोड की होस्ट कुंजी **ज्ञात होस्ट फ़ाइल** में रखें (डिफ़ॉल्ट `/etc/cacti/pfs/known_hosts`), ठीक उसी एंडपॉइंट नाम से जो दर्ज है। रीडर हल किए पते पर जुड़ता है, `HostKeyAlias` एंडपॉइंट पर रखता है और गायब या बदली कुंजी अस्वीकार करता है। खुद नई कुंजी कभी स्वीकार नहीं करता। +3. रजिस्ट्री में वे नेटवर्क अनुमति दें जहाँ पोलर पहुँच सकता है। नोड एंडपॉइंट का कोई भी पता उनसे बाहर हल हो तो नोड न सहेजा जाता है न पढ़ा जाता है। + + +## SSH विकल्प + +रीडर `ssh` में सभी विकल्पों से पहले `-F /dev/null` देता है, इसलिए पोलर उपयोगकर्ता की `~/.ssh/config` और सिस्टम `ssh_config` नहीं पढ़ी जातीं और उनमें कुछ विकल्प जोड़ या बदल नहीं सकता। साइट मान प्लगइन सेटिंग (सेटिंग, समानांतर फ़ाइल सिस्टम) में दें: SSH क्लाइंट पथ, कुंजी फ़ाइल, ज्ञात होस्ट फ़ाइल, कनेक्शन टाइमआउट, पढ़ने का टाइमआउट, अधिकतम प्रतिक्रिया आकार, रीडर बजट और समवर्ती संख्या। पोर्ट और लॉगिन नाम रजिस्ट्री में प्रति नोड सेट होते हैं। इनके बाहर जंप होस्ट या प्रॉक्सी कमांड जैसे विकल्प समर्थित नहीं हैं। diff --git a/docs/i18n/hi-IN/docs/operator-guide.md b/docs/i18n/hi-IN/docs/operator-guide.md new file mode 100644 index 0000000..228936c --- /dev/null +++ b/docs/i18n/hi-IN/docs/operator-guide.md @@ -0,0 +1,124 @@ + + + +# ऑपरेटर मार्गदर्शिका + +प्लगइन इंस्टॉल, चलाने, अपग्रेड, बैकअप और हटाने का तरीका तथा ग्राफ़/मान का अर्थ। नोड तैयारी [node-setup.md](node-setup.md) में और Thold/Maint अलर्ट [alerting.md](alerting.md) में हैं। + +स्थिति: चरण 1 का कोड पूरा है और केवल अस्थायी Cacti में फ़िक्स्चर नोड आउटपुट पर चला है। असली Lustre फ़ाइल सिस्टम पायलट की रिपोर्ट अभी नहीं आई ([#57](https://github.com/somethingwithproof/plugin_pfs/issues/57)); तब तक नीचे के हर आँकड़े को फ़िक्स्चर परिणाम मानें। + + +## आवश्यकताएँ + +| घटक | आवश्यकता | +|---|---| +| Cacti | 1.2.31 या नया, कोर पैच नहीं | +| PHP | वेब UI या पोलर चलाने वाले हर Cacti होस्ट पर 8.2 या नया। 8.0/8.1 पर प्लगइन सक्षम नहीं होता और Cacti चलता रहता है | +| Lustre | अनिवार्य-कमांड पढ़ने की स्क्रिप्ट से SSH द्वारा सर्वर; स्रोत से जाँचे संस्करण 2.15.8, 2.16.1, 2.17.0 | +| पोलर होस्ट | `ssh` क्लाइंट, रीडर की निजी कुंजी और ज्ञात होस्ट फ़ाइल | + + +## इंस्टॉल + +1. रिलीज़ खोलें ताकि डायरेक्टरी `/plugins/pfs` हो। नाम `pfs` होना चाहिए; GitHub स्रोत आर्काइव `plugin_pfs-` नाम से खुलता है, इसे बदलें। +2. Cacti में कॉन्फ़िगरेशन, प्लगइन खोलें और समानांतर फ़ाइल सिस्टम इंस्टॉल तथा सक्षम करें। इंस्टॉल तालिकाएँ बनाता, हुक और तीन realm दर्ज करता, डिवाइस/डेटा/ग्राफ़ टेम्पलेट आयात करता और दो डेटा क्वेरी फ़ाइलें Cacti में कॉपी करता है (अगला भाग)। +3. उपयोगकर्ता प्रबंधन में जरूरी realm दें: सूची और ताज़गी के लिए **Parallel Filesystem View**, संचालन पृष्ठ और निजी ट्रायेज पावती के लिए **Parallel Filesystem Operator**, तथा रजिस्ट्री और स्वास्थ्य के लिए **Parallel Filesystem Admin**। हर अनुरोध में Admin को Operator और Operator को View पहुँच मिलती है, स्थायी अनुदान नहीं जुड़ते। तीनों Cacti डिवाइस अनुमति मानते हैं। +4. कंसोल, समानांतर फ़ाइल सिस्टम स्वास्थ्य खोलें। हर चेतावनी सुधार बताती है। नई इंस्टॉल सामान्यतः अगली प्रक्रिया पूरी होने तक SSH कुंजी और ज्ञात होस्ट फ़ाइल गायब दिखाती है। +5. [node-setup.md](node-setup.md) के अनुसार नोड और पोलर तैयार करें। +6. प्रशासन में हर पोलर की अनुमत नेटवर्क सूची दें, फ़ाइल सिस्टम जोड़ें, फिर नोड (एंडपॉइंट, पोर्ट, लॉगिन नाम, भूमिका)। अनुमत नेटवर्क से बाहर हल होने वाला नोड सहेजा नहीं जाता। +7. एक पोल अंतराल प्रतीक्षा करें। हर पोलर पर Cacti `poller_bottom` हुक से रीडर चलता और सूची भरता है। सिस्टम पृष्ठ पर प्रस्तावित टारगेट जाँचें; अनदेखा टारगेट क्वेरी और सारांश से निकलता है। +8. प्रशासन से सिस्टम डिवाइस बनाएँ या मौजूदा से मैप करें। प्लगइन जोड़ने से पहले सूची दिखाता है: डिवाइस, दोनों क्वेरी और पाँच अवलोकन ग्राफ़। प्रति-टारगेट ग्राफ़ Cacti के नए ग्राफ़ पृष्ठ से माँग पर बनते हैं। + + +### डेटा क्वेरी फ़ाइलें + +Cacti केवल `/resource` के भीतर क्वेरी XML पढ़ता है, इसलिए इंस्टॉल प्लगइन की `resource/script_server/pfs_osts.xml` तथा `pfs_mdts.xml` को `/resource/script_server/` में कॉपी करता है। किसी गंतव्य पर प्रतीकात्मक लिंक हो तो अस्वीकार करता और उसी डायरेक्टरी की अस्थायी फ़ाइल से लिखता है। SHA-256 केवल खुद लिखी फ़ाइल का रखता है: उसी सामग्री की मौजूद फ़ाइल, जैसे नीचे हाथ से कॉपी की हुई, उपयोग होती लेकिन आपकी रहती है और अनइंस्टॉल उसे छोड़ता है। जो खुद नहीं लिखी या बाद में बदली उसे कभी नहीं बदलता; अनइंस्टॉल केवल खुद लिखी अपरिवर्तित फ़ाइल हटाता है। + +वेब उपयोगकर्ता डायरेक्टरी में न लिख सके तो स्वास्थ्य पृष्ठ बताता है और क्वेरी टारगेट नहीं दिखाती। अधिकृत उपयोगकर्ता से एक बार कॉपी करें; वेब और पोलर उपयोगकर्ताओं को पढ़ने दें: + +```sh +cd +install -m 0644 plugins/pfs/resource/script_server/pfs_osts.xml resource/script_server/ +install -m 0644 plugins/pfs/resource/script_server/pfs_mdts.xml resource/script_server/ +``` + +फिर स्वास्थ्य में **टेम्पलेट फिर इंस्टॉल करें** चुनें। दोनों प्रतियाँ प्लगइन से मिलें तो चेतावनी हटती है। प्रतियाँ आपकी हैं, इसलिए प्लगइन अपडेट या हटाता नहीं: फ़ाइल बदलने वाले अपग्रेड के बाद फिर कॉपी करें (अलग हों तो स्वास्थ्य चेतावनी देता है) और अनइंस्टॉल के बाद खुद हटाएँ। + + +## ग्राफ़ और मानों का अर्थ + +हर फ़ाइल सिस्टम एक Cacti डिवाइस है। उसके OST और MDT टारगेट दो स्क्रिप्ट सर्वर क्वेरी के इंडेक्स हैं। हर मान रीडर कैश से आता है; कोई ग्राफ़, पृष्ठ या डेटा स्रोत नोड से संपर्क नहीं करता। + +| ग्राफ़ | मान | कब अज्ञात | +|---|---|---| +| भराव (अवलोकन) | OST उपयोग प्रतिशत का अधिकतम, औसत और न्यूनतम तथा टारगेट inode उपयोग प्रतिशत का अधिकतम; इसी ग्राफ़ के नीचे कुल, गायब और अस्वस्थ टारगेट संख्या तथा सारांश के सबसे पुराने अवलोकन से सेकंड | क्षमता प्रतिशत: किसी टारगेट की उस मेट्रिक के लिए वर्तमान पढ़ाई नहीं; डेटा आयु: कभी देखा नहीं | +| असंतुलन (अवलोकन) | OST उपयोग प्रतिशत का फैलाव (अधिकतम घटा न्यूनतम) | किसी OST की वर्तमान क्षमता पढ़ाई नहीं | +| क्षमता (अवलोकन) | सिस्टम के कुल और उपलब्ध किलोबाइट | कोई OST गायब या पुराना, इसलिए कुल आंशिक होता | +| थ्रूपुट (अवलोकन) | सिस्टम के प्रति सेकंड पढ़े/लिखे बाइट और अलर्ट के लिए पढ़ने/लिखने की दर के gauge (ग्राफ़ के नीचे दिखते हैं) | कोई OST गायब, पुराना, काउंटर बिना अस्वस्थ या अंतराल में रीसेट; रीसेट के बाद दो या तीन पोल तक दर gauge भी अज्ञात | +| मेटाडेटा (अवलोकन) | सिस्टम के प्रति सेकंड सभी अनुमत मेटाडेटा ऑपरेशन तथा अलर्ट के लिए ऑपरेशन दर का gauge | कोई MDT गायब, पुराना या अंतराल में रीसेट; रीसेट के बाद दो या तीन पोल तक दर gauge भी अज्ञात | +| OST क्षमता, Inode, थ्रूपुट (प्रति टारगेट) | उपयोग/उपलब्ध, inode, प्रति सेकंड पढ़े/लिखे बाइट और ऑपरेशन | टारगेट गायब, पुराना या नोड ने मान नहीं छापा | +| MDT क्षमता, ऑपरेशन (प्रति टारगेट) | उपयोग/उपलब्ध, inode, प्रकार अनुसार प्रति सेकंड ऑपरेशन | वही | + +तालिका के नियम: + +- **उपयोग प्रतिशत** `lfs df` जैसा: उपयोग भाग उपयोग तथा उपलब्ध का योग, ऊपर पूर्णांकित। +- **अज्ञात अंतराल है, शून्य कभी नहीं।** गायब टारगेट, विफल पढ़ाई या न छपा मान अंतराल है। +- **काउंटर** कच्चे DERIVE रूप में, न्यूनतम 0 से रखे जाते हैं। रीसेट (कमी, बदला `start_time`, फ़ेलओवर के बाद दूसरे नोड का जवाब या पिछला अज्ञात मान) ठीक एक अंतराल अज्ञात करता है। +- **ताज़गी।** डेढ़ अंतराल तक वर्तमान, तीन तक विलंबित और बाद में पुराना। Gauge वर्तमान या विलंबित में मिलते हैं; काउंटर और सारांश के दर gauge केवल वर्तमान में, ताकि छूटी पढ़ाई अंतराल बने, सपाट रेखा और फिर दुगुनी दर नहीं। +- **निष्क्रिय टारगेट।** Lustre शुरू होने के बाद कभी न गिने काउंटर को नहीं छापता। टारगेट मौजूद, सेवा में और उसी पढ़ाई में अन्य मान रिपोर्ट करे तो सिस्टम योग उसे शून्य मानता है; प्रति-टारगेट ग्राफ़ फिर भी अंतराल दिखाता है ([ADR 0013](../../../decisions/0013-absent-counter-lines-count-as-zero-in-sums.md))। +- **टारगेट समूह बदलना।** योग में टारगेट जुड़ने या हटने पर एक पोल अज्ञात होता है ताकि पूरा इतिहास एक अंतराल न बने। +- **गायब टारगेट** इंडेक्स, स्रोत और इतिहास रखते हैं जब तक प्रशासक रजिस्ट्री में अनदेखा न करे। + + +## अपग्रेड + +1. पहले बैकअप लें (नीचे)। +2. `plugins/pfs` नई रिलीज़ से बदलें, नाम वही रखें। +3. कॉन्फ़िगरेशन, प्लगइन खोलें। Cacti नया संस्करण दिखाता है; अगली कॉन्फ़िगरेशन लोड पर (प्लगइन पृष्ठ खोलने से होता है) प्लगइन स्कीमा, हुक, realm, टेम्पलेट और क्वेरी फ़ाइल अपडेट करता है। बाधित अपग्रेड अगली लोड में पूरा होता है। स्कीमा पीछे हो तो रीडर नहीं चलता और अपग्रेड पूरा करने की जरूरत लॉग करता है। +4. दर gauge से पहले के प्री-रिलीज़ संस्करण से अपग्रेड करते समय, थ्रूपुट और मेटाडेटा ग्राफ़ का जरूरी इतिहास सुरक्षित करें, फिर वे अवलोकन ग्राफ़ हटाकर दोबारा बनाएँ। उनकी मौजूदा RRD फ़ाइलों में नए दर डेटा स्रोत नहीं हैं। +5. स्वास्थ्य और Cacti लॉग जाँचें। टेम्पलेट या क्वेरी समस्या बताई जाती है, चुपचाप छोड़ी नहीं जाती। + +डेटाबेस स्कीमा कोड से नया हो तो पुराने संस्करण पर लौटना अस्वीकार होता है; अपग्रेड से पहले का बैकअप बहाल करें। + + +## बैकअप और बहाली + +इनका एक साथ, एक ही समय पर बैकअप लें: + +| क्या | कहाँ | +|---|---| +| प्लगइन तालिकाएँ | Cacti डेटाबेस की हर `plugin_pfs_*` तालिका (`mysqldump cacti $(mysql -N -e "SHOW TABLES LIKE 'plugin\_pfs\_%'" cacti)`), या पूरा डेटाबेस | +| Cacti ऑब्जेक्ट | डेटाबेस: सिस्टम डिवाइस, उनके स्रोत/ग्राफ़, टेम्पलेट, `settings` में प्लगइन सेटिंग (`pfs_*`) | +| RRD फ़ाइलें | `/rra` या आपकी RRD डायरेक्टरी | +| नोड पहुँच | हर पोलर की सेटिंग वाली SSH कुंजी तथा ज्ञात होस्ट फ़ाइल; हर नोड का रीडर खाता, `authorized_keys` पंक्ति और `/usr/local/libexec/pfs-read.sh` | +| क्वेरी प्रतियाँ | हाथ से कॉपी किए हों तो `/resource/script_server/pfs_osts.xml` और `pfs_mdts.xml` | + +बहाली के लिए पोलर रोकें, एक ही बैकअप से डेटाबेस तथा RRD डायरेक्टरी बहाल करें, कुंजी/ज्ञात होस्ट फ़ाइल बहाल करें और पोलर शुरू करें। रीडर अगली रन में बिना डुप्लिकेट स्रोत बनाए जारी रहता है: डिवाइस, स्रोत और RRD को सहेजे ID/पथ से मिलाता है। बहाली का पहला पोल एक अज्ञात काउंटर अंतराल बनाता है क्योंकि रीडर अंतराल के पार दर पर भरोसा नहीं कर सकता। बहाल स्कीमा कोड से पुराना हो तो प्लगइन पहचानकर ऊपर के चरणों जैसा अपग्रेड करता है। `tests/bin/restore-flow.php` बहाली जाँचता है। + + +## अनइंस्टॉल + +1. वैकल्पिक: समानांतर फ़ाइल सिस्टम प्रशासन से रजिस्ट्री निर्यात करें। +2. कॉन्फ़िगरेशन, प्लगइन में बंद करके अनइंस्टॉल करें। +3. अनइंस्टॉल प्लगइन के हुक, realm और उसकी लिखी अपरिवर्तित डेटा क्वेरी प्रतियाँ हटाता है। `poller_bottom` हुक हटने से रीडर रुकता है, इसलिए नोड मान जुटना बंद होता है: मौजूदा ग्राफ़ इतिहास रखते हैं पर अपडेट रुकते हैं और नए मान अज्ञात होते हैं। आयातित टेम्पलेट अन्य टेम्पलेट की तरह Cacti में रहते हैं। **अनइंस्टॉल पर प्लगइन तालिकाएँ रखें** चुना हो (डिफ़ॉल्ट) तो तालिकाएँ रहती हैं; हटाने के लिए चयन हटाएँ। + - **डिवाइस।** डिफ़ॉल्ट रूप से हर डिवाइस, उसके डेटा स्रोत और ग्राफ़ रहते हैं। कॉन्फ़िगरेशन, सेटिंग्स, समानांतर फ़ाइल सिस्टम में **अनइंस्टॉल पर इस प्लगइन के बनाए डिवाइस हटाएँ** चुनें (डिफ़ॉल्ट बंद), ताकि अनइंस्टॉल प्रशासन पृष्ठ से बनाए डिवाइस Cacti की अपनी डिवाइस हटाने की प्रक्रिया से हटाए: उनके ग्राफ़ और डेटा स्रोत भी हटते हैं; RRD फ़ाइलें केवल Cacti की RRD सफ़ाई सेटिंग के अनुसार हटती हैं। प्लगइन हर बनाए डिवाइस को `plugin_pfs_created_devices` में एक पंक्ति में दर्ज करता है; फ़ाइल सिस्टम से मैप किया मौजूदा डिवाइस इसमें कभी नहीं आता और मैपिंग से जोड़ी क्वेरी तथा अवलोकन ग्राफ़ सहित हमेशा रहता है। हटे डिवाइस की मैपिंग फ़ाइल सिस्टम में नहीं रहती, इसलिए बची तालिकाएँ हटे डिवाइस को नहीं दर्शातीं। तालिकाएँ हटाने वाला अनइंस्टॉल भी `plugin_pfs_created_devices` को रखता है जब तक उसमें Cacti में मौजूद डिवाइस दर्ज हो, ताकि बाद में पुनः इंस्टॉल और अनइंस्टॉल उसे हटा सके; डिवाइस हमेशा रखने हों तो वह तालिका हाथ से हटाएँ। अपने बनाए डिवाइस, डेटा स्रोत, ग्राफ़ और RRD हटाना आपकी जिम्मेदारी है। +4. हर नोड से रीडर की `authorized_keys` पंक्ति, स्क्रिप्ट और खाता हटाएँ। अनइंस्टॉल स्टोरेज नोड से कभी संपर्क नहीं करता। + + +## समस्या निवारण + +स्वास्थ्य से शुरू करें; यह नोड, पोलर और कारण बताता है। फिर `PFS` से फ़िल्टर Cacti लॉग देखें। + +| लक्षण | कारण और समाधान | +|---|---| +| नोड कहता है «होस्ट कुंजी ज्ञात होस्ट फ़ाइल में नहीं या बदल गई» | ठीक पंजीकृत एंडपॉइंट नाम पर कुंजी जोड़ें/सुधारें। भरोसे से पहले बदली कुंजी अलग माध्यम से जाँचें; रीडर खुद स्वीकार नहीं करता | +| «निश्चित स्क्रिप्ट सीमाचिह्न बिना जवाब» | कुंजी अनिवार्य कमांड तक सीमित नहीं या कमांड `pfs-read.sh` नहीं। `authorized_keys` ठीक करें | +| «N ऐसे पैरामीटर छापे जो प्लगइन नहीं पढ़ता» | नोड शामिल स्क्रिप्ट से अलग कुछ चला रहा है। `node/pfs-read.sh` फिर इंस्टॉल करें | +| «अनुमत नेटवर्क से बाहर हल होता है» | प्रशासन में पोलर के लिए नेटवर्क अनुमति दें या एंडपॉइंट ठीक करें | +| नोड पढ़ाई विफल या आंशिक दर्ज | पहुँच नहीं, टाइमआउट या **अधिकतम प्रतिक्रिया** से बड़ा जवाब। टारगेट पुराने होने तक पिछले मान रखते, फिर अज्ञात होते हैं | +| «पोलर N के रीडर ने रन पूरी नहीं की» | `poller_bottom` नहीं चलता, PHP 8.2 से नीचे या Cacti की **PHP बाइनरी पथ** खाली है। लॉग कारण बताता है | +| क्वेरी में टारगेट नहीं | क्वेरी प्रतियाँ गायब/अलग (डेटा क्वेरी फ़ाइल देखें), या रीडर ने पढ़ाई पूरी नहीं की | +| प्रति-टारगेट काउंटर हमेशा अंतराल | खाता OST `stats` नहीं पढ़ सकता। Lustre 2.17 में debugfs में है ([node-setup.md](node-setup.md)) | +| सिस्टम थ्रूपुट अंतराल पर टारगेट थ्रूपुट बनता है | टारगेट गायब, पुराना, अस्वस्थ या अभी रीसेट; भराव ग्राफ़ की गायब/अस्वस्थ संख्या बताती है | +| अवलोकन ग्राफ़ बने पर खाली | डिवाइस का पोलर नोड पढ़ने वाले से अलग है; स्वास्थ्य अंतर बताता है | +| लॉग में `Plugin 'thold': Uncaught TypeError` और Thold बंद | काउंटर थ्रेशोल्ड ने अज्ञात अंतराल देखा; थ्रेशोल्ड हटाएँ, प्लगइन पृष्ठ से Thold फिर सक्षम करें और [alerting.md](alerting.md#counters-and-thold-182) देखें | diff --git a/docs/i18n/manifest.json b/docs/i18n/manifest.json new file mode 100644 index 0000000..a37b905 --- /dev/null +++ b/docs/i18n/manifest.json @@ -0,0 +1,15 @@ +{ + "locales": [ + "zh-CN", + "hi-IN", + "es-ES", + "es-419", + "ar-SA" + ], + "sources": [ + "README.md", + "docs/operator-guide.md", + "docs/node-setup.md", + "docs/alerting.md" + ] +} diff --git a/docs/i18n/zh-CN/README.md b/docs/i18n/zh-CN/README.md new file mode 100644 index 0000000..e86741f --- /dev/null +++ b/docs/i18n/zh-CN/README.md @@ -0,0 +1,102 @@ + + + +[English](../../../README.md) | [简体中文](README.md) | [हिन्दी](../hi-IN/README.md) | [Español (España)](../es-ES/README.md) | [Español (Latinoamérica)](../es-419/README.md) | [العربية](../ar-SA/README.md) + + + +# plugin_pfs + +一个 Cacti 1.2 插件,将并行文件系统健康和负载引入 Cacti:各目标的容量与填充不均衡、逐目标吞吐量和元数据操作速率。Lustre 是首个后端,GPFS(IBM Storage Scale)和 BeeGFS 将通过后端接口随后提供。数据进入普通 Cacti 设备、数据源和图表,因此 Thold 和 Maint 无需修改即可告警和抑制。 + +> **状态:里程碑 4,阶段 1 代码完成,尚未发布。** 里程碑 2(基础)、3(Lustre 观测)和 4(告警及发布准备)已在 `main` 完成或正在审查。插件通过 Cacti 插件 API 安装、升级和卸载,拒绝 PHP 低于 8.2。每个轮询器上的后台读取器通过 SSH 使用固定强制命令脚本([node/pfs-read.sh](../../../node/pfs-read.sh))读取 Lustre 服务器,缓存清单、状态、容量和计数器及其新鲜度。每个文件系统成为一个 Cacti 设备,带 OST 和 MDT 数据查询、五个概览图表、按需逐目标图表及供 Thold 使用的汇总数据源。未经修改的 Thold v1.8.2 和 Maint v1.3 已在端到端运行中对汇总 gauge 告警和抑制;Thold 1.8.2 不支持计数器阈值([docs/alerting.md](docs/alerting.md))。目前全部测试均在一次性 Cacti 中使用节点输出样本;插件尚未连接真实 Lustre 节点运行。发布前仍需完成:真实文件系统试点([试点计划](../../pilot-plan.md))、外部安全审查([自审](../../security-review.md))及在有文档记录的硬件上进行规模测量([规模](../../research/scale.md))。`INFO` 和 [CHANGELOG.md](../../../CHANGELOG.md) 已准备版本 0.1.0,但尚未打标签。 + + +## 访问角色 + +| 权限域 | 访问范围 | +| --- | --- | +| Parallel Filesystem View | 现有监控页面。 | +| Parallel Filesystem Operator | 监控,加上操作页面和个人分诊确认。 | +| Parallel Filesystem Admin | Operator 访问,加上现有配置和管理操作。 | + +复制升级文件后,以管理员身份打开插件页面以注册新权限域。在 **配置 > 用户** 或用户组中显式分配 Operator 权限域。升级保留现有 View 和 Admin 权限域 ID 及授权。每个请求中,Admin 继承 Operator,Operator 继承 View;这不会为用户或组添加持久授权。插件设置除要求 Cacti 的 Settings 权限外,还要求 Parallel Filesystem Admin。 + +Cacti 设备权限继续限制每位用户可见的行和可执行操作;未映射对象需要管理员。凭据、配置、映射、删除及其他管理变更仍位于管理页面。确认仅持续于当前用户会话,最多一小时,且仅在同一观测仍新鲜时有效。新的或变化的观测会使其失效。确认绝不将失败测量标为健康,也不抑制告警。 + + +## 为什么需要它 + +共享文件系统缓慢时,证据分散在各服务器。Lustre 按节点保存计数器:`lctl get_param` 报告“本地节点”的值,所以每个对象存储服务器(OSS)和元数据服务器(MDS)只持有自身目标的数值。调查缓慢文件系统的操作员需要从不同位置获得三个答案: + +- **是否某个目标正在填满,而其他目标为空?** 填充不均衡影响新文件落点以及单个目标何时耗尽空间。 +- **哪些目标或操作繁忙?** 逐目标字节计数器和逐 MDT 操作计数器揭示负载受数据还是元数据限制。 +- **监控本身是否当前?** 只有插件能看到服务器时,平直图线才令人放心。 + +Cacti 为主机绘图并通过 Thold 设置值阈值,但 Cacti GitHub 组织没有 Lustre、GPFS 或 BeeGFS 监控仓库(搜索于 2026-11-14)。插件通过从存储节点读取允许列表中的只读值,并将每个文件系统表示为 Cacti 设备、目标表示为数据查询索引,填补此缺口。它复用 Cacti 的图表、权限、远程数据采集器、Thold 和 Maint,而不建立平行版本。 + + +## 计划范围 + +| 阶段 | 范围 | 里程碑 | +|---|---|---| +| 0,研究 | 版本矩阵、节点访问决策、上游行为确认、计数器和故障转移行为、规模测量 | [M1](https://github.com/somethingwithproof/plugin_pfs/milestone/1) | +| 1,观测 | Lustre 清单、容量和填充、OST 吞吐量、MDT 操作速率、图表、Thold 告警、Maint 抑制、健康页面 | [M2](https://github.com/somethingwithproof/plugin_pfs/milestone/2)、[M3](https://github.com/somethingwithproof/plugin_pfs/milestone/3)、[M4](https://github.com/somethingwithproof/plugin_pfs/milestone/4) | +| 2,深入 | Cacti 远程数据采集器、对象数量受限的作业级和客户端级视图 | [M5](https://github.com/somethingwithproof/plugin_pfs/milestone/5) | +| 3,后端 | GPFS(IBM Storage Scale)和 BeeGFS 后端 | [M6](https://github.com/somethingwithproof/plugin_pfs/milestone/6) | + +范围外:对节点或文件系统的任何写入、清除、重置或调优操作;插件自有告警引擎;自定义守护进程或网络协议;逐作业数据源;修改 Cacti 核心、Thold 或 Maint。 + + +## 兼容性目标 + +| 组件 | 目标 | +|---|---| +| Cacti | 1.2.31 或更高,无需核心补丁 | +| PHP | 8.2 或更高;`setup.php` 保持可在 8.0 解析,使不支持的运行时得到拒绝而非损坏 Cacti 界面 | +| Lustre | 版本系列待里程碑 1 确定;目前检查的源码和手册为 2.17.0 | +| GPFS、BeeGFS | 阶段 3;版本待研究确定 | +| Thold、Maint | 无需修改 | + + +## 设计 + +- [docs/PLAN.md](../../PLAN.md) 为完整计划:架构、所依赖上游事实(含来源及仍未验证的内容)、计数器语义、状态模型、安全边界、性能计算、测试和风险。 +- [docs/operator-guide.md](docs/operator-guide.md) 包括安装、图表和值、升级、备份恢复、卸载及故障排除;[docs/alerting.md](docs/alerting.md) 介绍 Thold 和 Maint。 +- [docs/node-setup.md](docs/node-setup.md) 说明如何为读取器准备 Lustre 服务器及轮询器。 +- [docs/decisions/](../../decisions) 保存已做选择的架构决策记录。 +- [docs/REQUIREMENTS.md](../../REQUIREMENTS.md) 将每个需求 ID 映射到其议题。 + +```mermaid +flowchart LR + N[Lustre servers: OSS, MDS] -->|fixed read-only request| S[Node source on the Cacti poller] + S --> R[Reader] + R --> C[(Observation cache)] + C --> SS[Script server input] + SS -->|poller_output| T[Thold and Maint] + SS --> RRD[(Cacti RRDs)] + RRD --> G[Cacti graphs and permissions] +``` + + +## 工作跟踪方式 + +- **里程碑** 遵循计划中的里程碑。每个有一项 epic 议题,列出子议题和完成依据。 +- **议题** 用标签分类:`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/11) 显示各里程碑的全部议题。 + + +## 贡献 + +阅读 [CONTRIBUTING.md](../../../CONTRIBUTING.md)。提交需要 DCO 签署。设计讨论在议题中进行;未决决策带 `type: decision` 标签。 + + +## 安全 + +请私下报告漏洞;见 [SECURITY.md](../../../SECURITY.md)。 + + +## 许可证 + +GNU 通用公共许可证 v2.0,与 Cacti 及其插件相同。见 [LICENSE](../../../LICENSE)。 diff --git a/docs/i18n/zh-CN/docs/alerting.md b/docs/i18n/zh-CN/docs/alerting.md new file mode 100644 index 0000000..a1d73cc --- /dev/null +++ b/docs/i18n/zh-CN/docs/alerting.md @@ -0,0 +1,65 @@ + + + +# 使用 Thold 和 Maint 告警 + +插件没有告警引擎。Thold 阈值和 Maint 计划无需修改即可用于插件的数据源([ADR 0002](../../../decisions/0002-alert-through-cacti-data-sources.md))。本页介绍应对哪些值设阈值、已测试内容及限制。 + + +## 应设置阈值的内容 + +使用 **并行文件系统汇总** 值。每个概览图表有自己的汇总数据源,因此应从绘制所需值的图表创建阈值: + +| 值 | 图表 | 阈值示例 | 说明 | +|---|---|---|---| +| `fill_spread_pct` | 不均衡 | 高阈值 20(百分点) | 最满 OST 减最空 OST | +| `fill_max_pct` | 填充 | 高阈值 90 | 最满的 OST | +| `targets_missing` | 填充或不均衡 | 高阈值 0.5 | 未计入汇总的目标:缺失或没有当前容量读取 | +| `targets_unhealthy` | 填充 | 高阈值 0.5 | 状态标志不在服务中的目标;没有任何已知目标状态时为未知 | +| `age` | 填充 | 高阈值为轮询间隔的 3 倍 | 汇总所依据的最旧观测以来的秒数;只要文件系统曾被观测就为数值,因此节点无响应时持续增长 | +| `kbytes_avail` | 容量 | 低阈值,单位千字节 | 任意 OST 缺失时为未知,因此不会对中断告警 | +| `read_bytes_rate`, `write_bytes_rate` | 吞吐量 | 高阈值,单位字节/秒,2 次轮询 | 读取器计算的文件系统读写速率;重置后两至三次轮询中未知 | +| `md_ops_rate` | 元数据操作 | 高阈值,单位操作/秒,2 次轮询 | 文件系统元数据操作速率,计算方式相同 | +| `read_bytes`, `write_bytes`, `md_ops` | 吞吐量、元数据操作 | Thold 1.8.2 中不要设置;使用上述速率 | 计数器(DERIVE),仅用于图表 | + +逐目标 gauge(容量、inode)可同样从逐目标图表设置阈值。 + + +## 持续时间 + +- 将阈值的故障触发次数至少设为一次轮询。读取器和 Cacti 轮询器按各自计划运行,因此 Cacti 轮询时值可能已有一个间隔的年龄。 +- 未知值(`U`)绝不触发高或低阈值。在 Thold 1.8.2 源码中,未知值走未超限分支,因此已经超限的阈值在图表缺口时会记录恢复(通过阅读 `thold_check_threshold()` 确认,未做端到端验证)。汇总仍当前时,缺失目标反映在 `targets_missing` 中。当读取停止、汇总过期时,除 `age` 外所有值均返回 `U`,包括 `targets_missing`,所以应由 `age` 对读取中断告警;应对这些指示值告警,而不是对缺口告警。 +- 计数器重置会在该计数器图表上产生一个未知间隔,并使对应速率 gauge 在两至三次轮询中未知。 +- 速率阈值应为高阈值,故障触发次数至少设为两次轮询。阶段 1 不支持低速率阈值(“写入速率降至下限以下”),因为重置后的一次未知轮询会使其恢复([ADR 0012](../../../decisions/0012-thold-rate-alerts-high-thresholds-only.md#amendment-2026-11-15))。 + + +## 维护 + +将文件系统设备加入 Maint 计划。Thold 使用 Maint 自身函数检查设备,因此计划期间既不计数也不通知超限,也不记录相关日志。采集继续:读取器读取、轮询器轮询,RRD 文件记录值。计划结束时,仍存在的超限从零开始计数,在达到故障触发次数后通知。 + + +## 计数器与 Thold 1.8.2 + +使用 Thold 1.8.2 时,不要对计数器值(`read_bytes`、`write_bytes`、`md_ops` 或逐目标计数器)创建 Thold 阈值。请对速率 gauge 设置阈值。 + +对于无法信任的计数器间隔,插件返回 `U`:重置、目标加入或离开求和集合,或读取并非当前。Thold 1.8.2 将这个 `U` 存为 DERIVE 数据源的上一原始值,下一次数值出现时,其速率计算在 Cacti 轮询器输出处理中抛出 PHP `TypeError`。Cacti 随即禁用 Thold,且该次轮询输出处理停止。端到端运行观察到了这一问题(日志见 [research/thold-counters.md](../../../research/thold-counters.md#milestone-4-end-to-end-run))。 + +速率 gauge 避免了此问题:读取器计算速率,Cacti 将其存为 GAUGE,Thold 直接比较数值,无需计算。重置使 gauge 在两至三次轮询中为 `U`,Thold 将其视为未超限;端到端运行通过了该情况,Thold 始终保持启用。Thold 开发分支的 `dc76952`(未发布)为 DERIVE 路径添加了保护;待包含该变更的版本发布后,可重新考虑计数器阈值。 + +如果 Thold 因此错误被禁用:删除计数器阈值,在插件页面重新启用 Thold,然后对速率 gauge 创建阈值。 + + +## 已测试内容 + +`tests/bin/alert-replay.sh` 在一次性 Cacti 1.2.31 和 1.2.x 分支中,使用未经修改的 Thold v1.8.2(`1eb406bd0f81f3204358cce7bd43c8bb5adc8e4a`)和 Maint v1.3(`cd62de9cc323a4f5a8ac80a8d9dda3c7fa16c470`),以节点测试样本输出和真实轮询器运行进行测试。阈值通过 Thold 自己的 `save_thold()` 保存;Maint 计划为其计划页面保存的两行记录。 + +| 场景 | 阈值 | 结果 | +|---|---|---| +| 填充不均衡,随后平衡 | `fill_spread_pct` 大于 20,1 次轮询 | 通知一次,随后记录恢复 | +| 一个 OST 消失,随后返回 | `targets_missing` 大于 0.5,1 次轮询 | 通知,随后恢复 | +| OSS 停止响应 40 秒 | `age` 大于 30,1 次轮询 | `age` 保持数值时通知,节点响应后恢复 | +| 写入速率远高于阈值,持续两次轮询 | `write_bytes_rate` 大于 1 GB/s,2 次轮询 | 第一次超限不通知,第二次通知,随后恢复 | +| 每个 OST 的计数器重置,随后写入速率再次突增 | `write_bytes_rate` | 两次轮询为未知,没有超限、日志记录,Thold 仍启用;第三次速率恢复为数值,下一次突增会超限、通知并恢复 | +| Maint 计划期间不均衡,持续两次轮询 | `fill_spread_pct` | RRD 记录值,但不计数也不记日志;计划结束后的轮询通知 | + +未测试:通知投递(没有邮件服务器)、Thold 守护进程模式,以及远程数据采集器上的 Maint(*实机*)。 diff --git a/docs/i18n/zh-CN/docs/node-setup.md b/docs/i18n/zh-CN/docs/node-setup.md new file mode 100644 index 0000000..1b08c3d --- /dev/null +++ b/docs/i18n/zh-CN/docs/node-setup.md @@ -0,0 +1,68 @@ + + + +# 节点设置 + +本页说明如何准备 Lustre 服务器,让插件的读取器可以读取([ADR 0009](../../../decisions/0009-read-nodes-through-a-forced-ssh-command.md))。这里的内容尚未在真实 Lustre 节点上运行;实测见 [#20](https://github.com/somethingwithproof/plugin_pfs/issues/20) 和[试点计划](../../../pilot-plan.md)。在 Cacti 中安装插件见 [operator-guide.md](operator-guide.md)。 + + +## 在每台 Lustre 服务器上 + +1. 为读取器创建专用的非特权账户,例如 `pfsread`,不设密码且不作其他用途。 +2. 将 [node/pfs-read.sh](../../../../node/pfs-read.sh) 安装为 `/usr/local/libexec/pfs-read.sh`,所有者为 root,权限为 0755。它不接受参数,只读取允许列表,并输出带边界标记的内容。 +3. 将读取器公钥加入该账户的 `authorized_keys`,将脚本设为强制命令,不允许其他功能: + + ``` + restrict,command="/usr/local/libexec/pfs-read.sh" ssh-ed25519 AAAA... cacti-pfs + ``` + + `restrict` 关闭转发、代理转发、X11 和伪终端。sshd 用强制命令替换客户端要求的任何命令,因此客户端不能运行其他内容。 +4. Lustre 2.17 的 OST `stats` 和 `recovery_status` 文件位于 debugfs,默认仅 root 可读。如果不是 root,也没有使账户可读的 debugfs 挂载权限,这些目标会报告容量和状态,但计数器仍未知。允许哪种方式由站点决定([节点权限](../../../research/node-privileges.md))。 + + +## 各节点类型所需的读取器账户权限 + +读取器账户仅需读取下表文件,无其他权限:无需 sudo 规则,无需自身组以外的组成员资格,不得在 Lustre 任何位置写入,除强制命令外不得使用登录 shell。此结论源于 Lustre 源码([节点权限](../../../research/node-privileges.md)),尚未在真实节点确认。 + +| 节点类型 | 脚本读取的文件 | 非特权账户是否可读 | +|---|---|---| +| OSS(2.15、2.16) | `/sys/fs/lustre` 下的 `osd-*/-OST*/kbytes*`、`files*` 及 `obdfilter/-OST*/degraded`、`no_precreate`、`no_create`、`readonly`;`/proc/fs/lustre` 下的 `obdfilter/-OST*/stats` 和 `recovery_status` | 是 | +| OSS(2.17) | 相同 sysfs 文件;`/sys/kernel/debug/lustre` 下的 `stats` 和 `recovery_status` | sysfs 可以;debugfs 默认仅 root | +| MDS(三个版本) | `/sys/fs/lustre` 下的 `osd-*/-MDT*/kbytes*`、`files*`;`/proc/fs/lustre` 下的 `mdt/-MDT*/md_stats` | 是 | +| 任意 | `/sys/fs/lustre` 下的 `version` | 是 | + +如果站点授予 2.17 OSS 的 debugfs 访问权限,优先采用通过 `gid` 和 `mode` 允许专用组读取的 debugfs 挂载,而非以 root 运行脚本;注意这会向该组开放整个 debugfs。 + + +## 确认未授予额外权限 + +在每台服务器上,以 root 执行: + +```sh +id pfsread # only its own group, plus any debugfs group you chose +sudo -l -U pfsread # "not allowed to run sudo" +grep -n pfsread /etc/sudoers /etc/sudoers.d/* 2>/dev/null # nothing +cat ~pfsread/.ssh/authorized_keys # exactly one line, starting with restrict,command="/usr/local/libexec/pfs-read.sh" +ls -l /usr/local/libexec/pfs-read.sh # root-owned, 0755, not writable by pfsread +sshd -T -C user=pfsread,host=cacti,addr= | grep -Ei 'permituserenvironment|authorizedkeyscommand|forcecommand' +``` + +从轮询器以轮询器用户身份,使用配置的密钥和节点 SSH 端口执行(将 `` 替换为该端口): + +```sh +ssh -F /dev/null -p -i /etc/cacti/pfs/id_ed25519 -o UserKnownHostsFile=/etc/cacti/pfs/known_hosts -o HostKeyAlias= pfsread@
'id; cat /etc/shadow' +``` + +响应必须仅为读取脚本带边界标记的输出(`#pfs-read 1` … `#pfs-read end`),不能含所请求命令的任何输出。其他内容表示强制命令未生效;在将节点添加到注册表前修复。检查 `PermitUserEnvironment` 为 `no`,并且没有 `Match` 块或 `AuthorizedKeysCommand` 给账户其他密钥或命令。 + + +## 在每个读取节点的 Cacti 轮询器上 + +1. 将私钥放在 **SSH 密钥文件** 指定路径(默认 `/etc/cacti/pfs/id_ed25519`),仅轮询器用户可读。插件绝不创建、复制或打印它。其他用户可读时,健康页面会警告。 +2. 将每个节点主机密钥放在 **已知主机文件**(默认 `/etc/cacti/pfs/known_hosts`),按注册时完全相同的端点名称记录。读取器连接解析后的地址,并将 `HostKeyAlias` 设为端点;拒绝缺失或变更的密钥。它绝不自行接受新密钥。 +3. 在注册表页面允许该轮询器可访问的网络。节点端点只要解析到任何范围外地址,就既不保存也不读取。 + + +## SSH 选项 + +读取器运行 `ssh` 时,将 `-F /dev/null` 放在其他所有选项之前,因此不会读取轮询器用户的 `~/.ssh/config` 或系统 `ssh_config`,其中内容无法添加或更改选项。通过插件设置(设置、并行文件系统)配置站点值:SSH 客户端路径、密钥文件、已知主机文件、连接超时、读取超时、最大响应大小、读取器预算和并发数。节点端口及登录名在注册表中逐节点设置。不支持这些设置之外的选项,例如跳板主机或代理命令。 diff --git a/docs/i18n/zh-CN/docs/operator-guide.md b/docs/i18n/zh-CN/docs/operator-guide.md new file mode 100644 index 0000000..44ec4e3 --- /dev/null +++ b/docs/i18n/zh-CN/docs/operator-guide.md @@ -0,0 +1,124 @@ + + + +# 操作员指南 + +如何安装、运行、升级、备份和移除插件,以及其图表和值的含义。节点准备见 [node-setup.md](node-setup.md);使用 Thold 和 Maint 告警见 [alerting.md](alerting.md)。 + +状态:阶段 1 代码完成,仅在一次性 Cacti 中使用节点输出样本运行过。尚无真实 Lustre 文件系统试点报告([#57](https://github.com/somethingwithproof/plugin_pfs/issues/57));在有报告之前,请将下文所有数字视为测试样本结果。 + + +## 要求 + +| 组件 | 要求 | +|---|---| +| Cacti | 1.2.31 或更高,无需核心补丁 | +| PHP | 所有运行 Web 界面或轮询器的 Cacti 主机均需 8.2 或更高。PHP 8.0 或 8.1 时插件拒绝启用,Cacti 继续工作 | +| Lustre | 通过 SSH 强制命令读取脚本访问服务器;已从源码检查的版本为 2.15.8、2.16.1 和 2.17.0 | +| 轮询器主机 | `ssh` 客户端、读取器私钥及已知主机文件 | + + +## 安装 + +1. 解压发布包,使插件目录为 `/plugins/pfs`。目录必须名为 `pfs`;GitHub 源码包解压为 `plugin_pfs-`,必须重命名。 +2. 在 Cacti 打开配置、插件,安装并启用并行文件系统。安装创建插件表、注册钩子及三个权限域、导入设备/数据/图表模板,并将两个数据查询文件复制到 Cacti(见下一节)。 +3. 在用户管理中授予所需权限域:**Parallel Filesystem View** 用于清单和新鲜度,**Parallel Filesystem Operator** 用于操作页面和个人分诊确认,**Parallel Filesystem Admin** 用于注册表和健康页面。每次请求中 Admin 继承 Operator 访问权,Operator 继承 View 访问权,不增加持久授权。三者均遵循 Cacti 设备权限。 +4. 打开控制台、并行文件系统健康。每条警告都说明要修复的内容。新安装通常显示缺少 SSH 密钥和已知主机文件,直到完成后续步骤。 +5. 按 [node-setup.md](node-setup.md) 准备节点和轮询器。 +6. 在并行文件系统管理中,允许每个轮询器可访问的网络,添加文件系统,再添加节点(端点、端口、登录名、角色)。端点解析到允许网络之外的节点不会保存。 +7. 等待一个轮询间隔。读取器由各轮询器上的 Cacti `poller_bottom` 钩子运行,填充清单。在文件系统页面审查建议目标;忽略的目标会从数据查询和汇总中移除。 +8. 从管理页面创建文件系统设备(或映射到现有设备)。插件先列出将添加的内容,再执行:设备、两个数据查询及五个概览图表。逐目标图表可在 Cacti 新建图表页面按需创建。 + + +### 数据查询文件 + +Cacti 只读取 `/resource` 内的数据查询 XML,因此安装将插件中的 `resource/script_server/pfs_osts.xml` 和 `pfs_mdts.xml` 复制到 `/resource/script_server/`。目标任一处为符号链接时会拒绝,并通过同目录临时文件写入每个文件。它只记录自己写入文件的 SHA-256:已存在且内容相同的文件(例如按下列步骤手动复制)会被使用,但仍归您所有,卸载会保留。安装绝不替换非自身写入或后来被修改的文件,卸载仅移除自身写入且未修改的文件。 + +如果 Web 服务器用户不能写该目录,健康页面会说明,数据查询也无法列出目标。由有权限的用户复制一次文件,保持 Web 服务器和轮询器用户可读: + +```sh +cd +install -m 0644 plugins/pfs/resource/script_server/pfs_osts.xml resource/script_server/ +install -m 0644 plugins/pfs/resource/script_server/pfs_mdts.xml resource/script_server/ +``` + +然后在健康页面使用 **重新安装模板**。两个副本与插件一致时警告清除。由于这些副本归您所有,插件不更新也不移除:升级改变任一文件后请重新复制(不同时健康页面会警告),卸载后自行删除。 + + +## 图表和值的含义 + +每个文件系统是一个 Cacti 设备。其目标(OST 和 MDT)是两个脚本服务器数据查询的索引。所有值来自读取器缓存;图表、页面或数据源均不联系节点。 + +| 图表 | 值 | 何时未知 | +|---|---|---| +| 填充(概览) | OST 已用百分比最大值、平均值和最小值,以及目标 inode 已用百分比最大值;图表下方显示目标总数、缺失数、不健康数及汇总最旧观测以来的秒数 | 容量百分比:没有目标具备该指标的当前读取;数据年龄:从未观测 | +| 不均衡(概览) | OST 已用百分比差值(最大减最小) | 没有 OST 具备当前容量读取 | +| 容量(概览) | 文件系统总量和可用千字节 | 任意 OST 缺失或过期,导致总量不完整 | +| 吞吐量(概览) | 文件系统每秒读写字节,以及用于告警的读写速率 gauge(显示在图表下方) | 任意 OST 缺失、过期、不健康且没有计数器,或在间隔内重置;速率 gauge 在重置后的两至三次轮询中也未知 | +| 元数据(概览) | 文件系统每秒元数据操作,所有允许操作合计,以及用于告警的操作速率 gauge | 任意 MDT 缺失、过期或在间隔内重置;速率 gauge 在重置后的两至三次轮询中也未知 | +| OST 容量、Inode、吞吐量(逐目标) | 已用和可用、inode、每秒读写字节及每秒操作 | 目标缺失、过期或节点未输出该值 | +| MDT 容量、操作(逐目标) | 已用和可用、inode、按操作分类的每秒速率 | 同上 | + +表格背后的规则: + +- **已用百分比** 遵循 `lfs df`:已用除以已用加可用,向上取整。 +- **未知是缺口,绝不是零。** 缺失目标、读取失败或节点未输出的值均绘制为缺口。 +- **计数器** 以原始值存为 DERIVE,最小值 0。重置(下降、`start_time` 变化、故障转移后另一节点响应或上一值未知)恰好使一个间隔未知。 +- **新鲜度。** 年龄不超过一个半间隔为当前,最多三个间隔为延迟,之后为过期。Gauge 在当前或延迟时提供;计数器和汇总速率 gauge 仅在当前时提供,因此漏读是缺口,而非先平线再双倍速率。 +- **空闲目标。** Lustre 不输出自开始时间以来从未计数的计数器。对于存在、在服务中且本次读取报告了其他值的目标,文件系统求和将其视为零;逐目标图表仍显示缺口([ADR 0013](../../../decisions/0013-absent-counter-lines-count-as-zero-in-sums.md))。 +- **目标集合变化。** 当目标加入或离开求和集合时,该和在一次轮询中未知,以免将整个历史绘制为一个间隔。 +- **缺失目标** 保留索引、数据源和历史,直到管理员在注册表中忽略它们。 + + +## 升级 + +1. 先备份(见下文)。 +2. 用新版本替换 `plugins/pfs` 目录,保持目录名。 +3. 打开配置、插件。Cacti 显示新版本;下次加载配置时(打开插件页面就会加载),插件更新数据库结构、钩子、权限域、模板及数据查询文件。中断的升级会在下次加载时完成。结构版本落后时读取器不运行,并记录必须完成升级。 +4. 如果从尚无速率 gauge 的预发布版本升级,请先保留所需的吞吐量和元数据图表历史,再删除并重建这些概览图表。其现有 RRD 文件不包含新的速率数据源。 +5. 检查健康页面和 Cacti 日志。模板或查询文件问题会报告,不会静默跳过。 + +当数据库结构比代码新时,拒绝降级至旧插件版本;应恢复升级前的备份。 + + +## 备份和恢复 + +在同一时刻一起备份下列内容: + +| 内容 | 位置 | +|---|---| +| 插件表 | Cacti 数据库中所有 `plugin_pfs_*` 表(`mysqldump cacti $(mysql -N -e "SHOW TABLES LIKE 'plugin\_pfs\_%'" cacti)`),或整个 Cacti 数据库 | +| Cacti 对象 | Cacti 数据库:文件系统设备、其数据源和图表、模板及 `settings` 中的插件设置(`pfs_*`) | +| RRD 文件 | `/rra` 或您的 RRD 目录 | +| 节点访问 | 每个轮询器上插件设置指定的 SSH 密钥和已知主机文件。每个节点上的读取器账户、其 `authorized_keys` 行及 `/usr/local/libexec/pfs-read.sh` | +| 查询文件副本 | 手动复制时的 `/resource/script_server/pfs_osts.xml` 和 `pfs_mdts.xml` | + +恢复时,停止轮询器,从同一备份恢复数据库及 RRD 目录,恢复密钥和已知主机文件,然后启动轮询器。读取器下次运行会继续,不创建重复数据源:设备、数据源及 RRD 文件按存储的 ID 和路径匹配。恢复后第一次轮询绘制一个未知计数器间隔,因为读取器无法信任跨缺口速率。如果恢复的结构比安装代码旧,插件会检测并按升级步骤更新。恢复由 `tests/bin/restore-flow.php` 验证。 + + +## 卸载 + +1. 可选:从并行文件系统管理导出注册表。 +2. 在配置、插件中先禁用再卸载。 +3. 卸载移除插件钩子、权限域及自身写入且未修改的数据查询文件副本。移除 `poller_bottom` 钩子会停止读取器,因此卸载后不再采集节点值:现有图表保留历史但停止更新,最新值变未知。导入的模板像其他导入模板一样留在 Cacti。默认勾选 **卸载时保留插件表** 时表保留;取消则删除。 + - **设备。** 默认保留每个设备及其数据源和图表。在配置、设置、并行文件系统中勾选 **卸载时删除此插件创建的设备**(默认关闭),卸载便会通过 Cacti 自身的设备删除功能删除插件从管理页面创建的设备:其图表和数据源随之删除,RRD 文件仅在 Cacti 的 RRD 清理设置要求时删除。插件在 `plugin_pfs_created_devices` 中记录自己创建的每个设备,每设备一行;映射到文件系统的现有设备绝不进入此记录,始终保留,包括映射添加的数据查询和概览图表。设备删除后,文件系统不再保留其映射,因此保留的表不会指向已删除设备。即使卸载删除插件表,只要 `plugin_pfs_created_devices` 仍列有 Cacti 中存在的设备,该表就会保留,使以后重新安装和卸载时仍能删除它们;如果永久保留这些设备,请手动删除该表。您自行创建的设备、数据源、图表和 RRD 文件由您自行移除。 +4. 在每个节点移除读取器的 `authorized_keys` 行、读取脚本及账户。卸载绝不联系存储节点。 + + +## 故障排除 + +先查看健康页面,它指出节点、轮询器及原因;然后查看按 `PFS` 筛选的 Cacti 日志。 + +| 症状 | 原因与修复 | +|---|---| +| 节点显示“主机密钥不在已知主机文件中,或已变化” | 使用与注册完全一致的端点名添加或修正密钥。信任变更密钥前通过独立渠道验证;读取器绝不自行接受 | +| “响应没有固定读取脚本边界标记” | 密钥未限制到强制命令,或命令并非 `pfs-read.sh`。修复 `authorized_keys` 行 | +| “输出了插件不读取的 N 个参数” | 节点运行的不是随附脚本。重新安装 `node/pfs-read.sh` | +| “解析到允许网络之外” | 在管理页面允许该轮询器访问的网络,或修正端点 | +| 节点读取被记录为失败或部分完成 | 无法访问、超时或响应超过 **最大响应**。目标保留上次值直到过期,然后变未知 | +| “轮询器 N 上的读取器尚未完成运行” | 轮询器未运行 `poller_bottom`、其 PHP 低于 8.2,或 Cacti 的 **PHP 二进制路径** 为空。日志指出具体原因 | +| 数据查询没有列出目标 | 查询文件副本缺失或不同(见数据查询文件),或读取器尚未完成读取 | +| 逐目标图表上的计数器始终缺口 | 读取器账户无法读 OST `stats`。Lustre 2.17 将其放在 debugfs([node-setup.md](node-setup.md)) | +| 文件系统吞吐量缺口,但逐目标吞吐量有图线 | 某目标缺失、过期、不健康或刚重置;填充图上的缺失及不健康目标计数说明情况 | +| 概览图表已创建但为空 | 设备由另一轮询器采集,而非读取其节点的轮询器;健康页面警告不匹配 | +| 轮询器日志显示 `Plugin 'thold': Uncaught TypeError` 且 Thold 被禁用 | 计数器上的 Thold 阈值遇到未知间隔;删除阈值,在插件页面重新启用 Thold,并参阅 [alerting.md](alerting.md#counters-and-thold-182) | diff --git a/docs/node-setup.md b/docs/node-setup.md index f430eab..cd78398 100644 --- a/docs/node-setup.md +++ b/docs/node-setup.md @@ -41,10 +41,10 @@ ls -l /usr/local/libexec/pfs-read.sh # root-owned, 0755, not writable by sshd -T -C user=pfsread,host=cacti,addr= | grep -Ei 'permituserenvironment|authorizedkeyscommand|forcecommand' ``` -From the poller, as the poller user, using the configured key: +From the poller, as the poller user, using the configured key and node SSH port (replace `` with that port): ```sh -ssh -F /dev/null -i /etc/cacti/pfs/id_ed25519 -o UserKnownHostsFile=/etc/cacti/pfs/known_hosts -o HostKeyAlias= pfsread@
'id; cat /etc/shadow' +ssh -F /dev/null -p -i /etc/cacti/pfs/id_ed25519 -o UserKnownHostsFile=/etc/cacti/pfs/known_hosts -o HostKeyAlias= pfsread@
'id; cat /etc/shadow' ``` The answer must be the framed output of the read script (`#pfs-read 1` ... `#pfs-read end`) and nothing from the requested command. Anything else means the forced command is not in effect; fix it before adding the node to the registry. Check that `PermitUserEnvironment` is `no` and that no `Match` block or `AuthorizedKeysCommand` gives the account another key or command. diff --git a/docs/operator-guide.md b/docs/operator-guide.md index f2e360e..86d70ad 100644 --- a/docs/operator-guide.md +++ b/docs/operator-guide.md @@ -16,8 +16,8 @@ Status: phase 1 is code complete and has run only against fixture node output in ## Install 1. Unpack the release so that the plugin directory is `/plugins/pfs`. The directory must be named `pfs`; a GitHub source archive unpacks as `plugin_pfs-` and has to be renamed. -2. In Cacti, open Configuration, Plugins, and install and enable Parallel Filesystems. The install creates the plugin tables, registers its hooks and two realms, imports the device, data, and graph templates, and copies the two data query files into Cacti (next section). -3. Give users the realms they need under User Management: **Parallel Filesystem View** for the filesystem page, **Parallel Filesystem Admin** for the registry and health pages. The view realm sees inventory and freshness only. Both follow Cacti's device permissions. +2. In Cacti, open Configuration, Plugins, and install and enable Parallel Filesystems. The install creates the plugin tables, registers its hooks and three realms, imports the device, data, and graph templates, and copies the two data query files into Cacti (next section). +3. Give users the realms they need under User Management: **Parallel Filesystem View** for inventory and freshness, **Parallel Filesystem Operator** for the Operations page and personal triage acknowledgments, and **Parallel Filesystem Admin** for the registry and health pages. Admin inherits Operator access, and Operator inherits View access on each request, without adding persistent grants. All three follow Cacti's device permissions. 4. Open Console, Parallel Filesystem Health. Every warning there names what to fix. A fresh install normally shows the missing SSH key and known hosts files until the next steps are done. 5. Prepare the nodes and the poller as in [node-setup.md](node-setup.md). 6. In Parallel Filesystem Admin, allow the networks each poller may reach, add the filesystem, then its nodes (endpoint, port, login name, role). A node whose endpoint resolves outside the allowed networks is not saved. @@ -44,11 +44,11 @@ Each filesystem is one Cacti device. Its targets (OSTs and MDTs) are the indexes | Graph | Values | Unknown when | |---|---|---| -| Fill (overview) | Maximum, mean, and minimum OST used percentage, spread (maximum minus minimum), targets total, missing, and unhealthy | No OST has a current capacity reading | +| Fill (overview) | Maximum, mean, and minimum OST used percentage and maximum target inode used percentage; target totals, missing and unhealthy counts, and seconds since the oldest observation behind the summary, printed under this graph | Capacity percentages: no target has a current reading for that metric; data age: never observed | +| Imbalance (overview) | Spread of OST used percentages (maximum minus minimum) | No OST has a current capacity reading | | Capacity (overview) | Filesystem total and available kilobytes | Any OST is missing or stale, so the total would be partial | -| Throughput (overview) | Filesystem read and write bytes per second, and the read and write rate gauges for alerts (printed under the graph) | Any OST is missing, stale, unhealthy without its counter, or reset in the interval; the rate gauges also for one or two polls after a reset | -| Metadata (overview) | Filesystem metadata operations per second, all allowlisted operations together, and the operation rate gauge for alerts | Any MDT is missing, stale, or reset in the interval; the rate gauge also for one or two polls after a reset | -| Data age (overview) | Seconds since the oldest observation behind the summary, and contributor counts | Never observed | +| Throughput (overview) | Filesystem read and write bytes per second, and the read and write rate gauges for alerts (printed under the graph) | Any OST is missing, stale, unhealthy without its counter, or reset in the interval; the rate gauges also for two or three polls after a reset | +| Metadata (overview) | Filesystem metadata operations per second, all allowlisted operations together, and the operation rate gauge for alerts | Any MDT is missing, stale, or reset in the interval; the rate gauge also for two or three polls after a reset | | OST Capacity, Inodes, Throughput (per target) | Used and available, inodes, read and write bytes per second and operations per second | The target is missing, stale, or the node did not print the value | | MDT Capacity, Operations (per target) | Used and available, inodes, operations per second by operation | Same | diff --git a/include/operator.php b/include/operator.php new file mode 100644 index 0000000..4f3c7bc --- /dev/null +++ b/include/operator.php @@ -0,0 +1,55 @@ + + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This file is part of plugin_pfs, a plugin for Cacti. + * https://github.com/somethingwithproof/plugin_pfs + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + +use Somethingwithproof\Pfs\SystemClock; +use Somethingwithproof\Pfs\FilesystemRepository; +use Somethingwithproof\Pfs\NodeRepository; +use Somethingwithproof\Pfs\NodeHealthRepository; + +/** @return list */ +function pfs_operator_rows(): array { + $rows = []; + $clock = new SystemClock(); + $filesystems = []; + + foreach ((new FilesystemRepository(false, $clock))->all(true) as $fs) { + if ($fs->hostId > 0 && is_device_allowed($fs->hostId)) { + $filesystems[$fs->id] = $fs; + } + } + $health = (new NodeHealthRepository(false))->all(true); + + foreach ((new NodeRepository(false, $clock))->all(true) as $node) { + if (!isset($filesystems[$node->filesystemId])) { + continue; + } + $fs = $filesystems[$node->filesystemId]; + $h = $health[$node->id] ?? null; + $rows[] = [ + 'id' => (string) $node->id, + 'name' => $fs->name . ' / ' . $node->name, + 'state' => $node->adminState->value . ' / ' . ($h->outcome->value ?? 'never'), + 'observed' => $h->lastAttempt ?? 0, + 'interval' => $fs->interval, + 'detail' => ($h->error->value ?? '') . ' ' . __('Inspect target capacity, imbalance and freshness on Parallel Filesystems. Escalate node access, target acceptance and device mapping to an administrator.', 'pfs') + ]; + } + + return $rows; +} diff --git a/lib/FilesystemRepository.php b/lib/FilesystemRepository.php index b4458c6..b559ef0 100644 --- a/lib/FilesystemRepository.php +++ b/lib/FilesystemRepository.php @@ -32,10 +32,15 @@ public function find(int $id): ?Filesystem { /** * @return list */ - public function all(): array { + public function all(bool $strict = false): array { + $result = db_fetch_assoc_prepared('SELECT * FROM plugin_pfs_filesystem ORDER BY name, id', [], true, $this->connection); + + if ($strict && !is_array($result)) { + throw new \RuntimeException('Operator observations could not be read'); + } $out = []; - foreach (Row::rows(db_fetch_assoc_prepared('SELECT * FROM plugin_pfs_filesystem ORDER BY name, id', [], true, $this->connection)) as $row) { + foreach (Row::rows($result) as $row) { $filesystem = Filesystem::fromRow($row); if ($filesystem !== null) { diff --git a/lib/NodeHealthRepository.php b/lib/NodeHealthRepository.php index 8eb077d..b3fe006 100644 --- a/lib/NodeHealthRepository.php +++ b/lib/NodeHealthRepository.php @@ -26,10 +26,15 @@ public function __construct(private readonly \PDO|false $connection) { /** * @return array node id => last read */ - public function all(): array { + public function all(bool $strict = false): array { + $result = db_fetch_assoc_prepared('SELECT * FROM plugin_pfs_node_health', [], true, $this->connection); + + if ($strict && !is_array($result)) { + throw new \RuntimeException('Operator observations could not be read'); + } $out = []; - foreach (Row::rows(db_fetch_assoc_prepared('SELECT * FROM plugin_pfs_node_health', [], true, $this->connection)) as $row) { + foreach (Row::rows($result) as $row) { $health = NodeHealth::fromRow($row); if ($health !== null) { diff --git a/lib/NodeRepository.php b/lib/NodeRepository.php index 61eee73..74564ba 100644 --- a/lib/NodeRepository.php +++ b/lib/NodeRepository.php @@ -32,8 +32,13 @@ public function find(int $id): ?Node { /** * @return list */ - public function all(): array { - return $this->nodes(Row::rows(db_fetch_assoc_prepared('SELECT * FROM plugin_pfs_node ORDER BY name, id', [], true, $this->connection))); + public function all(bool $strict = false): array { + $result = db_fetch_assoc_prepared('SELECT * FROM plugin_pfs_node ORDER BY name, id', [], true, $this->connection); + + if ($strict && !is_array($result)) { + throw new \RuntimeException('Operator observations could not be read'); + } + return $this->nodes(Row::rows($result)); } /** diff --git a/lib/OperatorPage.php b/lib/OperatorPage.php new file mode 100644 index 0000000..30a26aa --- /dev/null +++ b/lib/OperatorPage.php @@ -0,0 +1,133 @@ + + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This file is part of plugin_pfs, a plugin for Cacti. + * https://github.com/somethingwithproof/plugin_pfs + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + +namespace Somethingwithproof\Pfs; + +/** Personal triage of current observations. It never changes measured health. */ +final class OperatorPage { + /** @param list $actions */ + public static function actionStatus(bool $allowed, string $action, string $method, bool $csrf, array $actions): int { + if (!$allowed) { + return 403; + } + + if (!in_array($action, $actions, true)) { + return 400; + } + + if ($method !== 'POST') { + return 405; + } + + return $csrf ? 200 : 403; + } + + /** @param array{id: string, name: string, state: string, observed: int, interval: int, detail: string} $row */ + public static function fingerprint(array $row): string { + return hash('sha256', (string) json_encode($row)); + } + + /** @param array{id: string, name: string, state: string, observed: int, interval: int, detail: string} $row */ + public static function fresh(array $row, int $now): bool { + return $row['observed'] > 0 && $row['observed'] <= $now && $now - $row['observed'] <= max(60, $row['interval']) * 2; + } + + /** + * Session-only acknowledgments expire with the evidence or after one hour. + * Only rows reloaded within the current user's device scope may be supplied. + * @param array $session + * @param array{id: string, name: string, state: string, observed: int, interval: int, detail: string} $row + */ + public static function acknowledge(array &$session, array $row, string $fingerprint, int $user, int $now): bool { + if ($user <= 0 || !self::fresh($row, $now) || !hash_equals(self::fingerprint($row), $fingerprint)) { + return false; + } + $entries = isset($session['entries'], $session['user']) && $session['user'] === $user && is_array($session['entries']) ? $session['entries'] : []; + + foreach ($entries as $id => $entry) { + if (!is_array($entry) || !isset($entry['at']) || !is_int($entry['at']) || $entry['at'] > $now || $now - $entry['at'] > 3600) { + unset($entries[$id]); + } + } + unset($entries[$row['id']]); + $entries[$row['id']] = ['fingerprint' => $fingerprint, 'at' => $now]; + $session = ['user' => $user, 'entries' => array_slice($entries, -100, null, true)]; + + return true; + } + + /** + * @param array $session + * @param array{id: string, name: string, state: string, observed: int, interval: int, detail: string} $row + */ + public static function acknowledged(array $session, array $row, int $user, int $now): bool { + $entries = $session['entries'] ?? []; + $entry = is_array($entries) ? ($entries[$row['id']] ?? null) : null; + + return ($session['user'] ?? 0) === $user && is_array($entry) + && isset($entry['fingerprint'], $entry['at']) && is_string($entry['fingerprint']) && is_int($entry['at']) + && $entry['at'] <= $now && $now - $entry['at'] <= 3600 + && self::fresh($row, $now) && hash_equals(self::fingerprint($row), $entry['fingerprint']); + } + + /** @param array{id: string, name: string, state: string, observed: int, interval: int, detail: string} $row */ + public static function form(array $row, string $action, string $label): void { + form_start('pfs_operator.php'); + print ''; + print ''; + print ''; + print ''; + form_end(false); + } + + /** + * @param list $rows + * @param array $session + * @param array $actions + */ + public static function render(array $rows, array $session, int $user, int $now, array $actions): void { + print '

' . html_escape(__('Review the recorded observations below. Acknowledgments are personal to this session, expire when observations change, and never suppress alerts or change health.', 'pfs')) . '

'; + print '
'; + html_start_box(__('Parallel Filesystem Operations', 'pfs'), '100%', '', '3', 'center', ''); + print '' . implode('', array_map('html_escape', [__('Object', 'pfs'), __('State', 'pfs'), __('Observed (UTC)', 'pfs'), __('Investigation', 'pfs'), __('Actions', 'pfs')])) . ''; + + foreach ($rows as $row) { + $fresh = self::fresh($row, $now); + $state = $row['state'] . ($fresh ? '' : ' / ' . __('Unknown or stale', 'pfs')); + print '' . html_escape($row['name']) . '' . html_escape($state) . '' . html_escape($row['observed'] > 0 ? gmdate('Y-m-d H:i:s', $row['observed']) : __('Never', 'pfs')) . '' . html_escape($row['detail']) . ''; + + if (self::acknowledged($session, $row, $user, $now)) { + print html_escape(__('Acknowledged; health unchanged.', 'pfs')); + } elseif ($fresh) { + self::form($row, 'acknowledge', __('Acknowledge', 'pfs')); + } + + foreach ($actions as $action => $label) { + self::form($row, $action, $label); + } + print ''; + } + + if ($rows === []) { + print '' . html_escape(__('No observations are available for devices you may access.', 'pfs')) . ''; + } + html_end_box(); + print '
'; + } +} diff --git a/lib/Pages.php b/lib/Pages.php index 1b22cb0..47d88d8 100644 --- a/lib/Pages.php +++ b/lib/Pages.php @@ -29,6 +29,7 @@ * REQ-HEALTH-004); the view realm sees inventory and freshness only. */ final class Pages { + public const OPERATOR = ['pfs_operator.php']; public const VIEW = ['pfs.php']; public const ADMIN = ['pfs_admin.php', 'pfs_health.php']; @@ -37,6 +38,7 @@ final class Pages { */ public static function realms(): array { return [ + ['name' => __('Parallel Filesystem Operator', 'pfs'), 'files' => self::OPERATOR], ['name' => __('Parallel Filesystem View', 'pfs'), 'files' => self::VIEW], ['name' => __('Parallel Filesystem Admin', 'pfs'), 'files' => self::ADMIN], ]; @@ -46,7 +48,7 @@ public static function realms(): array { * @return list */ public static function files(): array { - return array_merge(self::VIEW, self::ADMIN); + return array_merge(self::VIEW, self::ADMIN, self::OPERATOR); } /** @@ -57,6 +59,7 @@ public static function files(): array { */ public static function menu(): array { return [ + 'pfs_operator.php' => __('Parallel Filesystem Operations', 'pfs'), 'pfs.php' => __('Parallel Filesystems', 'pfs'), 'pfs_admin.php' => __('Parallel Filesystem Registry', 'pfs'), 'pfs_health.php' => __('Parallel Filesystem Health', 'pfs'), diff --git a/lib/Schema.php b/lib/Schema.php index 3b90763..ac9fd47 100644 --- a/lib/Schema.php +++ b/lib/Schema.php @@ -38,6 +38,7 @@ final class Schema { public const VERSION = 3; public const HOOKS = [ + 'auth_alternate_realms' => 'pfs_auth_alternate_realms', 'config_arrays' => 'pfs_config_arrays', 'config_settings' => 'pfs_config_settings', 'draw_navigation_text' => 'pfs_draw_navigation_text', @@ -105,6 +106,10 @@ public function recordPluginVersion(string $version, string $author, string $hom db_execute_prepared('UPDATE plugin_config SET version = ?, author = ?, webpage = ? WHERE directory = ?', [$version, $author, $homepage, self::PLUGIN], true, $this->connection); } + public function pluginEnabled(): bool { + return (int) db_fetch_cell_prepared('SELECT status FROM plugin_config WHERE directory = ?', [self::PLUGIN], '', true, $this->connection) === 1; + } + public function hooksRegistered(): bool { $placeholders = implode(', ', array_fill(0, count(self::HOOKS), '?')); diff --git a/locales/LC_MESSAGES/ar-SA.mo b/locales/LC_MESSAGES/ar-SA.mo new file mode 100644 index 0000000..f81ab63 Binary files /dev/null and b/locales/LC_MESSAGES/ar-SA.mo differ diff --git a/locales/LC_MESSAGES/es-419.mo b/locales/LC_MESSAGES/es-419.mo new file mode 100644 index 0000000..ee746a6 Binary files /dev/null and b/locales/LC_MESSAGES/es-419.mo differ diff --git a/locales/LC_MESSAGES/es-ES.mo b/locales/LC_MESSAGES/es-ES.mo new file mode 100644 index 0000000..1194cda Binary files /dev/null and b/locales/LC_MESSAGES/es-ES.mo differ diff --git a/locales/LC_MESSAGES/hi-IN.mo b/locales/LC_MESSAGES/hi-IN.mo new file mode 100644 index 0000000..3638571 Binary files /dev/null and b/locales/LC_MESSAGES/hi-IN.mo differ diff --git a/locales/LC_MESSAGES/zh-CN.mo b/locales/LC_MESSAGES/zh-CN.mo new file mode 100644 index 0000000..d244be6 Binary files /dev/null and b/locales/LC_MESSAGES/zh-CN.mo differ diff --git a/locales/build_gettext.sh b/locales/build_gettext.sh index 0c96532..566f100 100755 --- a/locales/build_gettext.sh +++ b/locales/build_gettext.sh @@ -94,6 +94,8 @@ if [ "${1:-}" = "--check" ]; then fi done + python3 tests/check_translations.py || rc=1 + [ $rc -eq 0 ] && echo "catalogs are complete and compiled" exit $rc fi diff --git a/locales/po/ar-SA.po b/locales/po/ar-SA.po new file mode 100644 index 0000000..c2ba43a --- /dev/null +++ b/locales/po/ar-SA.po @@ -0,0 +1,874 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: 2026 Thomas Vincent +# +msgid "" +msgstr "" +"Project-Id-Version: pfs 0.1.0\n" +"Report-Msgid-Bugs-To: https://github.com/somethingwithproof/plugin_pfs/issues\n" +"PO-Revision-Date: 2026-11-17 00:00+0000\n" +"Last-Translator: Thomas Vincent \n" +"Language-Team: Thomas Vincent \n" +"Language: ar-SA\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);\n" + +#: include/operator.php +msgid "Inspect target capacity, imbalance and freshness on Parallel Filesystems. Escalate node access, target acceptance and device mapping to an administrator." +msgstr "افحص سعة الأهداف وعدم التوازن وحداثة البيانات في أنظمة الملفات المتوازية. أحِل الوصول إلى العقد وقبول الأهداف وربط الأجهزة إلى مسؤول." + +#: lib/AccessMethod.php +msgid "SSH forced command" +msgstr "أمر SSH مفروض" + +#: lib/AdminPage.php +msgid "Filesystems" +msgstr "أنظمة الملفات" + +#: lib/AdminPage.php lib/OperatorPage.php +msgid "Actions" +msgstr "الإجراءات" + +#: lib/AdminPage.php +msgid "Backend" +msgstr "الواجهة الخلفية" + +#: lib/AdminPage.php +msgid "Cacti Device" +msgstr "جهاز Cacti" + +#: lib/AdminPage.php +msgid "Expected Interval" +msgstr "الفاصل المتوقع" + +#: lib/AdminPage.php +msgid "Name" +msgstr "الاسم" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Nodes" +msgstr "العقد" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Poller" +msgstr "المستطلِع" + +#: lib/AdminPage.php lib/OperatorPage.php +msgid "State" +msgstr "الحالة" + +#: lib/AdminPage.php lib/TargetsPage.php +msgid "No filesystems registered yet." +msgstr "لم تُسجل أنظمة ملفات بعد." + +#: lib/AdminPage.php +#, php-format +msgid "%d seconds" +msgstr "%d ثانية" + +#: lib/AdminPage.php +msgid "Delete" +msgstr "حذف" + +#: lib/AdminPage.php +msgid "Access" +msgstr "الوصول" + +#: lib/AdminPage.php +msgid "Endpoint" +msgstr "نقطة الاتصال" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Filesystem" +msgstr "نظام الملفات" + +#: lib/AdminPage.php +msgid "Login Name" +msgstr "اسم تسجيل الدخول" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Role" +msgstr "الدور" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "No nodes registered yet." +msgstr "لم تُسجل عقد بعد." + +#: lib/AdminPage.php +msgid "Register a filesystem first." +msgstr "سجّل نظام ملفات أولًا." + +#: lib/AdminPage.php +msgid "Export" +msgstr "تصدير" + +#: lib/AdminPage.php +msgid "Download the registry (filesystems, nodes, networks, and target review) as JSON before an uninstall that drops the plugin tables. It holds no key or credential." +msgstr "نزّل السجل بصيغة JSON، بما يشمل أنظمة الملفات والعقد والشبكات ومراجعة الأهداف، قبل إلغاء تثبيت يحذف جداول الإضافة. لا يحتوي السجل على مفاتيح أو بيانات اعتماد." + +#: lib/AdminPage.php +#, php-format +msgid "Filesystem: %s" +msgstr "نظام الملفات: %s" + +#: lib/AdminPage.php +msgid "New Filesystem" +msgstr "نظام ملفات جديد" + +#: lib/AdminPage.php +msgid "Expected Interval (seconds)" +msgstr "الفاصل المتوقع (ثوانٍ)" + +#: lib/AdminPage.php +msgid "Enabled" +msgstr "مفعّل" + +#: lib/AdminPage.php +msgid "New Node" +msgstr "عقدة جديدة" + +#: lib/AdminPage.php +#, php-format +msgid "Node: %s" +msgstr "العقدة: %s" + +#: lib/AdminPage.php +msgid "Endpoint (host name or address)" +msgstr "نقطة الاتصال (اسم المضيف أو عنوانه)" + +#: lib/AdminPage.php +msgid "SSH Port" +msgstr "منفذ SSH" + +#: lib/AdminPage.php +msgid "The node must list the reader key in authorized_keys for this login with a forced command running pfs-read.sh, for example: restrict,command=\"/usr/local/libexec/pfs-read.sh\" followed by the public key. The host key must be in the known hosts file under the endpoint as written here." +msgstr "يجب أن تدرج العقدة مفتاح القارئ في authorized_keys لهذا الحساب، مع أمر مفروض يشغّل pfs-read.sh، مثل restrict,command=\"/usr/local/libexec/pfs-read.sh\" تتبعه قيمة المفتاح العام. يجب حفظ مفتاح المضيف في ملف المضيفين المعروفين تحت نقطة الاتصال كما كُتبت هنا." + +#: lib/AdminPage.php +#, php-format +msgid "Cacti Device for Filesystem %s" +msgstr "جهاز Cacti لنظام الملفات %s" + +#: lib/AdminPage.php +msgid "Create a new device" +msgstr "إنشاء جهاز جديد" + +#: lib/AdminPage.php +msgid "Device" +msgstr "الجهاز" + +#: lib/AdminPage.php +msgid "Show What Will Be Added" +msgstr "عرض ما سيُضاف" + +#: lib/AdminPage.php +msgid "Objects to Add" +msgstr "الكائنات المراد إضافتها" + +#: lib/AdminPage.php +msgid "The device keeps its own settings, poller included. Nothing on it is changed or removed." +msgstr "يحتفظ الجهاز بإعداداته، بما فيها المستطلِع. لا يُغيّر أو يُزال أي شيء عليه." + +#: lib/AdminPage.php +msgid "Per-target graphs are created on demand from the device's New Graphs page." +msgstr "تُنشأ رسوم كل هدف عند الطلب من صفحة الرسوم الجديدة للجهاز." + +#: lib/AdminPage.php +msgid "Create the Device" +msgstr "إنشاء الجهاز" + +#: lib/AdminPage.php +msgid "Map This Device" +msgstr "ربط هذا الجهاز" + +#: lib/AdminPage.php +msgid "Allowed Networks" +msgstr "الشبكات المسموح بها" + +#: lib/AdminPage.php +msgid "Network" +msgstr "الشبكة" + +#: lib/AdminPage.php +msgid "No networks allowed yet. A poller reaches no node until its networks are listed here." +msgstr "لا توجد شبكات مسموح بها بعد. لا يصل المستطلِع إلى أي عقدة حتى تُدرج شبكاتها هنا." + +#: lib/AdminPage.php +msgid "Allow" +msgstr "سماح" + +#: lib/AdminPage.php +msgid "Targets Awaiting Review" +msgstr "أهداف بانتظار المراجعة" + +#: lib/AdminPage.php lib/TargetsPage.php +msgid "Presence" +msgstr "الوجود" + +#: lib/AdminPage.php lib/TargetsPage.php +msgid "Target" +msgstr "الهدف" + +#: lib/AdminPage.php +msgid "Values It Adds" +msgstr "القيم التي يضيفها" + +#: lib/AdminPage.php +msgid "Accept" +msgstr "قبول" + +#: lib/AdminPage.php +msgid "Ignore" +msgstr "تجاهل" + +#: lib/AdminPage.php +msgid "No targets await review." +msgstr "لا توجد أهداف بانتظار المراجعة." + +#: lib/AdminPage.php +msgid "Add a device" +msgstr "إضافة جهاز" + +#: lib/AdminPage.php +#, php-format +msgid "(polled by poller %d, not %d)" +msgstr "(يستطلعه المستطلِع %d، وليس %d)" + +#: lib/AdminPage.php +msgid "Unmap" +msgstr "إلغاء الربط" + +#: lib/AdminPage.php +msgid "Save" +msgstr "حفظ" + +#: lib/DeviceProvisioner.php +msgid "The Parallel Filesystem templates are not installed. Reinstall them from the health page." +msgstr "قوالب أنظمة الملفات المتوازية غير مثبتة. أعد تثبيتها من صفحة السلامة." + +#: lib/DeviceProvisioner.php +#, php-format +msgid "A device \"%s\" from the %s device template, polled by poller %d, with availability checks off." +msgstr "جهاز «%s» من قالب الأجهزة %s، يستطلعه المستطلِع %d مع تعطيل اختبارات التوفر." + +#: lib/DeviceProvisioner.php +#, php-format +msgid "The data query \"%s\", listing %d targets known now. It creates no graph by itself." +msgstr "استعلام البيانات «%s» الذي يسرد %d هدفًا معروفًا حاليًا. لا ينشئ أي رسم بمفرده." + +#: lib/DeviceProvisioner.php +#, php-format +msgid "The graph \"%s\"." +msgstr "الرسم «%s»." + +#: lib/DeviceProvisioner.php +#, php-format +msgid "A \"%s\" data source for each of those graphs, each one script server call per poll cycle, whatever the number of targets." +msgstr "مصدر بيانات «%s» لكل رسم، مع استدعاء واحد لخادم السكربتات لكل مصدر في دورة الاستطلاع، مهما كان عدد الأهداف." + +#: lib/DeviceProvisioner.php +#, php-format +msgid "Created by the Parallel Filesystem plugin for filesystem %s. Its values come from the plugin cache; the host name is a reserved name that is never contacted." +msgstr "أنشأته إضافة أنظمة الملفات المتوازية لنظام الملفات %s. تأتي قيمه من ذاكرة الإضافة المؤقتة؛ واسم المضيف محجوز ولا يُتصل به مطلقًا." + +#: lib/FilesystemInput.php +msgid "Backend: choose one of the listed backends." +msgstr "الواجهة الخلفية: اختر واحدة من القائمة." + +#: lib/FilesystemInput.php +msgid "Name: use the filesystem name the nodes print, such as the Lustre fsname of at most 8 letters, digits, dashes, or underscores." +msgstr "الاسم: استخدم اسم نظام الملفات الذي تطبعه العقد، مثل fsname في Lustre بطول أقصاه 8 أحرف أو أرقام أو شرطات أو شرطات سفلية." + +#: lib/FilesystemInput.php lib/NodeInput.php +msgid "Poller: choose one of the listed pollers." +msgstr "المستطلِع: اختر مستطلِعًا من القائمة." + +#: lib/FilesystemInput.php +#, php-format +msgid "Expected Interval: enter whole seconds from %d to %d." +msgstr "الفاصل المتوقع: أدخل عددًا صحيحًا من الثواني بين %d و%d." + +#: lib/Format.php lib/OperatorPage.php +msgid "Never" +msgstr "مطلقًا" + +#: lib/Format.php +#, php-format +msgid "%d seconds ago" +msgstr "قبل %d ثانية" + +#: lib/Format.php +#, php-format +msgid "%d minutes ago" +msgstr "قبل %d دقيقة" + +#: lib/Format.php +#, php-format +msgid "%d hours ago" +msgstr "قبل %d ساعة" + +#: lib/Format.php +#, php-format +msgid "%d days ago" +msgstr "قبل %d يوم" + +#: lib/Format.php +#, php-format +msgid "%d B" +msgstr "%d B" + +#: lib/Format.php +#, php-format +msgid "%s KiB" +msgstr "%s KiB" + +#: lib/Format.php +#, php-format +msgid "%s MiB" +msgstr "%s MiB" + +#: lib/GraphLinks.php +#, php-format +msgid "Parallel Filesystem view of %s" +msgstr "عرض نظام الملفات المتوازي لـ %s" + +#: lib/HealthPage.php +msgid "Parallel Filesystem Warnings" +msgstr "تحذيرات أنظمة الملفات المتوازية" + +#: lib/HealthPage.php +msgid "No warnings." +msgstr "لا توجد تحذيرات." + +#: lib/HealthPage.php +msgid "Install the Templates Again" +msgstr "إعادة تثبيت القوالب" + +#: lib/HealthPage.php +msgid "Readers" +msgstr "القارئات" + +#: lib/HealthPage.php +msgid "Failed" +msgstr "فشل" + +#: lib/HealthPage.php +msgid "Last Completed Run" +msgstr "آخر تشغيل مكتمل" + +#: lib/HealthPage.php +msgid "Last Run" +msgstr "آخر تشغيل" + +#: lib/HealthPage.php +msgid "Not Reached" +msgstr "لم يُوصل إليه" + +#: lib/HealthPage.php +msgid "Read" +msgstr "مقروء" + +#: lib/HealthPage.php +msgid "No reader has run yet." +msgstr "لم يعمل أي قارئ بعد." + +#: lib/HealthPage.php +msgid "Duration" +msgstr "المدة" + +#: lib/HealthPage.php +msgid "Failure" +msgstr "الفشل" + +#: lib/HealthPage.php +msgid "Last Read" +msgstr "آخر قراءة" + +#: lib/HealthPage.php +msgid "Last Success" +msgstr "آخر نجاح" + +#: lib/HealthPage.php +msgid "Node" +msgstr "العقدة" + +#: lib/HealthPage.php +msgid "Reported Version" +msgstr "الإصدار المُبلّغ عنه" + +#: lib/HealthPage.php +msgid "Response Size" +msgstr "حجم الاستجابة" + +#: lib/HealthPage.php +msgid "disabled" +msgstr "معطل" + +#: lib/HealthPage.php +#, php-format +msgid "%s s" +msgstr "%s ث" + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the node answered without the fixed read script framing. Its key may not be limited to a forced command running pfs-read.sh." +msgstr "%s: ردّت العقدة دون تأطير سكربت القراءة المحدد. قد لا يكون مفتاحها مقيدًا بأمر مفروض يشغّل pfs-read.sh." + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the node host key is not in the known hosts file, or it changed. Check the key before adding it." +msgstr "%s: مفتاح مضيف العقدة غير موجود في ملف المضيفين المعروفين، أو تغير. تحقق منه قبل إضافته." + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the endpoint resolves outside the networks allowed for poller %d, so it is not read." +msgstr "%s: تُحل نقطة الاتصال إلى عنوان خارج الشبكات المسموح بها للمستطلِع %d، لذا لا تُقرأ." + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the read script printed %d parameters the plugin does not read, so it is not the shipped pfs-read.sh. The node may be exposing more than the plugin needs." +msgstr "%s: طبع سكربت القراءة %d معاملًا لا تقرؤه الإضافة، لذا فهو ليس pfs-read.sh المرفق. قد تكشف العقدة معلومات أكثر مما تحتاج إليه الإضافة." + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: %d target names in the node output did not match the expected pattern or filesystem and were ignored." +msgstr "%s: لم يطابق %d اسم هدف في مخرجات العقدة النمط أو نظام الملفات المتوقع، فتُجاهلت." + +#: lib/HealthWarnings.php +#, php-format +msgid "The reader on poller %d has not completed a run in the last %d seconds. Values from its nodes are getting stale." +msgstr "لم يُكمل قارئ المستطلِع %d تشغيلًا خلال آخر %d ثانية. أصبحت قيم عقده قديمة." + +#: lib/HealthWarnings.php +#, php-format +msgid "Installing the Parallel Filesystem templates failed: %s" +msgstr "فشل تثبيت قوالب أنظمة الملفات المتوازية: %s" + +#: lib/HealthWarnings.php +msgid "The Parallel Filesystem templates are not installed, so no device can be added." +msgstr "قوالب أنظمة الملفات المتوازية غير مثبتة، لذا لا يمكن إضافة أجهزة." + +#: lib/HealthWarnings.php +#, php-format +msgid "The data query file resource/script_server/%s is missing from Cacti or differs from the one this plugin ships, so the data queries cannot list targets." +msgstr "ملف استعلام البيانات resource/script_server/%s مفقود في Cacti أو يختلف عن الملف المرفق بالإضافة، لذا لا يمكن للاستعلامات سرد الأهداف." + +#: lib/HealthWarnings.php +#, php-format +msgid "Filesystem %s is mapped to device %d, which no longer exists." +msgstr "نظام الملفات %s مرتبط بالجهاز %d الذي لم يعد موجودًا." + +#: lib/HealthWarnings.php +#, php-format +msgid "The device of filesystem %s is polled by poller %d, but its nodes are read by poller %d, whose cache the device's data sources need." +msgstr "جهاز نظام الملفات %s يستطلعه المستطلِع %d، لكن عقده يقرؤها المستطلِع %d الذي تحتاج مصادر بيانات الجهاز إلى ذاكرته المؤقتة." + +#: lib/HealthWarnings.php +#, php-format +msgid "The SSH key file %s does not exist on this server." +msgstr "ملف مفتاح SSH‏ %s غير موجود على هذا الخادم." + +#: lib/HealthWarnings.php +#, php-format +msgid "The SSH key file %s can be read or written by users other than its owner (mode %s). Limit it to the poller user." +msgstr "يمكن لمستخدمين غير المالك قراءة ملف مفتاح SSH‏ %s أو الكتابة فيه (الوضع %s). اقصر الوصول على مستخدم المستطلِع." + +#: lib/HealthWarnings.php +#, php-format +msgid "The known hosts file %s does not exist on this server, so no node can be read from it." +msgstr "ملف المضيفين المعروفين %s غير موجود على هذا الخادم، لذا لا يمكن قراءة أي عقدة." + +#: lib/HealthWarnings.php +#, php-format +msgid "The SSH client %s does not exist on this server." +msgstr "عميل SSH‏ %s غير موجود على هذا الخادم." + +#: lib/NodeInput.php +msgid "Filesystem: choose one of the registered filesystems." +msgstr "نظام الملفات: اختر أحد أنظمة الملفات المسجلة." + +#: lib/NodeInput.php +msgid "Name: use 1 to 64 letters, digits, dots, dashes, or underscores, starting with a letter or digit." +msgstr "الاسم: استخدم من 1 إلى 64 حرفًا أو رقمًا أو نقطة أو شرطة أو شرطة سفلية، بدءًا بحرف أو رقم." + +#: lib/NodeInput.php +msgid "Role: choose one of the listed roles." +msgstr "الدور: اختر دورًا من القائمة." + +#: lib/NodeInput.php +msgid "Port: enter a port from 1 to 65535." +msgstr "المنفذ: أدخل منفذًا بين 1 و65535." + +#: lib/NodeInput.php +msgid "Login Name: use a lower-case account name of at most 32 characters, starting with a letter or underscore." +msgstr "اسم تسجيل الدخول: استخدم اسم حساب بأحرف صغيرة لا يتجاوز 32 حرفًا، يبدأ بحرف أو شرطة سفلية." + +#: lib/NodeInput.php +msgid "Endpoint: enter a host name or an IP address only, without a user, port, or path." +msgstr "نقطة الاتصال: أدخل اسم مضيف أو عنوان IP فقط، دون مستخدم أو منفذ أو مسار." + +#: lib/NodeInput.php +msgid "Endpoint: the name does not resolve on this server." +msgstr "نقطة الاتصال: لا يُحل الاسم على هذا الخادم." + +#: lib/NodeInput.php +#, php-format +msgid "Endpoint: it resolves to %s, which is not inside the networks allowed for this poller. Add the network first." +msgstr "نقطة الاتصال: تُحل إلى %s خارج الشبكات المسموح بها لهذا المستطلِع. أضف الشبكة أولًا." + +#: lib/NodeRole.php +msgid "Management server (MGS)" +msgstr "خادم الإدارة (MGS)" + +#: lib/NodeRole.php +msgid "Metadata server (MDS)" +msgstr "خادم البيانات الوصفية (MDS)" + +#: lib/NodeRole.php +msgid "Object storage server (OSS)" +msgstr "خادم تخزين الكائنات (OSS)" + +#: lib/NodeRole.php +msgid "Client" +msgstr "العميل" + +#: lib/OperatorPage.php +msgid "Review the recorded observations below. Acknowledgments are personal to this session, expire when observations change, and never suppress alerts or change health." +msgstr "راجع الملاحظات المسجلة أدناه. الإقرارات شخصية لهذه الجلسة، وتنتهي عند تغيّر الملاحظات، ولا تمنع التنبيهات أو تغيّر حالة السلامة." + +#: lib/OperatorPage.php lib/Pages.php +msgid "Parallel Filesystem Operations" +msgstr "عمليات أنظمة الملفات المتوازية" + +#: lib/OperatorPage.php +msgid "Investigation" +msgstr "التحقيق" + +#: lib/OperatorPage.php +msgid "Object" +msgstr "الكائن" + +#: lib/OperatorPage.php +msgid "Observed (UTC)" +msgstr "وقت الرصد (UTC)" + +#: lib/OperatorPage.php +msgid "Unknown or stale" +msgstr "غير معروف أو قديم" + +#: lib/OperatorPage.php +msgid "Acknowledged; health unchanged." +msgstr "تم الإقرار؛ حالة السلامة لم تتغير." + +#: lib/OperatorPage.php +msgid "Acknowledge" +msgstr "إقرار" + +#: lib/OperatorPage.php +msgid "No observations are available for devices you may access." +msgstr "لا تتوفر ملاحظات للأجهزة التي يمكنك الوصول إليها." + +#: lib/Pages.php +msgid "Parallel Filesystem Operator" +msgstr "مشغّل أنظمة الملفات المتوازية" + +#: lib/Pages.php +msgid "Parallel Filesystem View" +msgstr "عرض أنظمة الملفات المتوازية" + +#: lib/Pages.php +msgid "Parallel Filesystem Admin" +msgstr "إدارة أنظمة الملفات المتوازية" + +#: lib/Pages.php lib/TargetsPage.php setup.php +msgid "Parallel Filesystems" +msgstr "أنظمة الملفات المتوازية" + +#: lib/Pages.php +msgid "Parallel Filesystem Registry" +msgstr "سجل أنظمة الملفات المتوازية" + +#: lib/Pages.php +msgid "Parallel Filesystem Health" +msgstr "سلامة أنظمة الملفات المتوازية" + +#: lib/ReadError.php +msgid "The plugin settings for node access are incomplete or unusable" +msgstr "إعدادات الإضافة للوصول إلى العقد غير مكتملة أو غير صالحة" + +#: lib/ReadError.php +msgid "The endpoint resolves outside the networks allowed for its poller" +msgstr "تُحل نقطة الاتصال خارج الشبكات المسموح بها لمستطلِعها" + +#: lib/ReadError.php +msgid "The endpoint name does not resolve" +msgstr "لا يُحل اسم نقطة الاتصال" + +#: lib/ReadError.php +msgid "The node could not be reached" +msgstr "تعذر الوصول إلى العقدة" + +#: lib/ReadError.php +msgid "The node host key is unknown or changed" +msgstr "مفتاح مضيف العقدة غير معروف أو تغيّر" + +#: lib/ReadError.php +msgid "The node refused the key" +msgstr "رفضت العقدة المفتاح" + +#: lib/ReadError.php +msgid "The read exceeded its time limit" +msgstr "تجاوزت القراءة الحد الزمني" + +#: lib/ReadError.php +msgid "The response exceeded the size limit" +msgstr "تجاوزت الاستجابة حد الحجم" + +#: lib/ReadError.php +msgid "The read command failed" +msgstr "فشل أمر القراءة" + +#: lib/ReadError.php +msgid "The node did not answer with the fixed read script" +msgstr "لم ترد العقدة بسكربت القراءة المحدد" + +#: lib/ReadError.php +msgid "The response ended before the read script finished" +msgstr "انتهت الاستجابة قبل اكتمال سكربت القراءة" + +#: lib/Settings.php +msgid "Node Access" +msgstr "الوصول إلى العقد" + +#: lib/Settings.php +msgid "Absolute path to the ssh client on each poller that reads nodes." +msgstr "المسار المطلق لعميل ssh على كل مستطلِع يقرأ العقد." + +#: lib/Settings.php +msgid "SSH Client" +msgstr "عميل SSH" + +#: lib/Settings.php +msgid "Absolute path, on each poller that reads nodes, to the private key whose public half each node lists in authorized_keys with a forced command running pfs-read.sh. Readable only by the poller user. The plugin never creates, copies, or prints it." +msgstr "المسار المطلق للمفتاح الخاص على كل مستطلِع قارئ للعقد، والذي يُدرج مفتاحه العام في authorized_keys بكل عقدة مع أمر مفروض يشغّل pfs-read.sh. يقرأه مستخدم المستطلِع فقط. لا تنشئه الإضافة أو تنسخه أو تطبعه." + +#: lib/Settings.php +msgid "SSH Key File" +msgstr "ملف مفتاح SSH" + +#: lib/Settings.php +msgid "Absolute path to the known_hosts file holding each node host key under the node endpoint name. A node whose key is missing or changed is not read." +msgstr "المسار المطلق لملف known_hosts الذي يحتفظ بمفتاح كل عقدة تحت اسم نقطة اتصالها. لا تُقرأ العقدة إذا كان مفتاحها مفقودًا أو متغيرًا." + +#: lib/Settings.php +msgid "Known Hosts File" +msgstr "ملف المضيفين المعروفين" + +#: lib/Settings.php +msgid "Connect Timeout" +msgstr "مهلة الاتصال" + +#: lib/Settings.php +msgid "Seconds to wait for a node to accept the connection." +msgstr "ثواني انتظار قبول العقدة للاتصال." + +#: lib/Settings.php +msgid "Read Timeout" +msgstr "مهلة القراءة" + +#: lib/Settings.php +msgid "Seconds one node read may take in total before it is stopped and recorded as failed." +msgstr "إجمالي الثواني المسموح بها لقراءة عقدة قبل إيقافها وتسجيلها كفشل." + +#: lib/Settings.php +msgid "KiB one node may return. A larger answer is discarded and recorded as failed." +msgstr "عدد KiB الذي يمكن أن تعيده العقدة. تُرفض الاستجابة الأكبر وتُسجل كفشل." + +#: lib/Settings.php +msgid "Maximum Response" +msgstr "الحد الأقصى للاستجابة" + +#: lib/Settings.php +msgid "Reader" +msgstr "القارئ" + +#: lib/Settings.php +msgid "Reader Time Budget" +msgstr "الميزانية الزمنية للقارئ" + +#: lib/Settings.php +msgid "Seconds one reader run may spend before it stops starting node reads. Keep it below the poller interval; unread nodes are read on the next run." +msgstr "الثواني المسموح بها لتشغيل القارئ قبل التوقف عن بدء قراءات جديدة. أبقها أقل من فاصل الاستطلاع؛ تُقرأ العقد المتبقية في التشغيل التالي." + +#: lib/Settings.php +msgid "Concurrent Reads" +msgstr "القراءات المتزامنة" + +#: lib/Settings.php +msgid "Node reads one reader runs at the same time." +msgstr "عدد قراءات العقد التي ينفذها القارئ في الوقت نفسه." + +#: lib/Settings.php +msgid "Uninstall" +msgstr "إلغاء التثبيت" + +#: lib/Settings.php +msgid "Keep Plugin Tables on Uninstall" +msgstr "الاحتفاظ بجداول الإضافة عند إلغاء التثبيت" + +#: lib/Settings.php +msgid "When checked, uninstalling the plugin keeps its filesystems, nodes, inventory, and cache. Clear it to have the uninstall drop them; export the registry first from the Parallel Filesystem Admin page. Storage nodes are never contacted either way." +msgstr "عند تحديده، يحتفظ إلغاء التثبيت بأنظمة الملفات والعقد والجرد والذاكرة المؤقتة. ألغِ تحديده لحذفها؛ صدّر السجل أولًا من صفحة إدارة أنظمة الملفات المتوازية. لا يُتصل بعقد التخزين في الحالتين." + +#: lib/Settings.php +msgid "Delete the Devices This Plugin Created on Uninstall" +msgstr "حذف الأجهزة التي أنشأها هذا الملحق عند الإزالة" + +#: lib/Settings.php +msgid "When checked, uninstalling the plugin deletes the devices it created for filesystems, with their graphs and data sources, as deleting them in Cacti would. Existing devices that were mapped to a filesystem are never deleted. RRD files are removed only if Cacti's own RRD cleanup setting removes them. Cleared, the devices stay." +msgstr "عند التحديد، تحذف إزالة الملحق الأجهزة التي أنشأها لأنظمة الملفات مع رسومها ومصادر بياناتها، كما يحدث عند حذفها في Cacti. لا تُحذف مطلقًا الأجهزة الموجودة التي رُبطت بنظام ملفات. لا تُحذف ملفات RRD إلا إذا نص إعداد تنظيف RRD في Cacti نفسه على ذلك. عند إلغاء التحديد تبقى الأجهزة." + +#: lib/TargetsPage.php +msgid "No filesystem is visible to you." +msgstr "لا توجد أنظمة ملفات مرئية لك." + +#: lib/TargetsPage.php +#, php-format +msgid "Filesystem %s" +msgstr "نظام الملفات %s" + +#: lib/TargetsPage.php +msgid "Graphs of this filesystem" +msgstr "رسوم نظام الملفات هذا" + +#: lib/TargetsPage.php +msgid "Condition" +msgstr "الوضع" + +#: lib/TargetsPage.php +msgid "Freshness" +msgstr "حداثة البيانات" + +#: lib/TargetsPage.php +msgid "Known Values" +msgstr "القيم المعروفة" + +#: lib/TargetsPage.php +msgid "Last Seen" +msgstr "آخر رصد" + +#: lib/TargetsPage.php +msgid "Recovery" +msgstr "الاستعادة" + +#: lib/TargetsPage.php +msgid "Review" +msgstr "المراجعة" + +#: lib/TargetsPage.php +msgid "Source Node" +msgstr "العقدة المصدر" + +#: lib/TargetsPage.php +msgid "No targets found yet." +msgstr "لم تُعثر على أهداف بعد." + +#: pfs_admin.php +msgid "That record belongs to a Cacti device you do not have permission for. Nothing was changed." +msgstr "يتبع هذا السجل جهاز Cacti لا تملك صلاحية الوصول إليه. لم يتغير شيء." + +#: pfs_admin.php +msgid "Name: another filesystem of this backend already uses this name." +msgstr "الاسم: يستخدم نظام ملفات آخر لهذه الواجهة الخلفية هذا الاسم بالفعل." + +#: pfs_admin.php +msgid "The filesystem could not be saved." +msgstr "تعذر حفظ نظام الملفات." + +#: pfs_admin.php +msgid "The filesystem was saved." +msgstr "حُفظ نظام الملفات." + +#: pfs_admin.php +msgid "The filesystem, its nodes, and its inventory were deleted. Its Cacti device, data sources, and graphs were kept. No node was contacted." +msgstr "حُذف نظام الملفات وعقده وجرده. حُفظ جهاز Cacti ومصادر البيانات والرسوم. لم يُتصل بأي عقدة." + +#: pfs_admin.php +msgid "Name: another node already uses this name." +msgstr "الاسم: تستخدم عقدة أخرى هذا الاسم بالفعل." + +#: pfs_admin.php +msgid "The node could not be saved." +msgstr "تعذر حفظ العقدة." + +#: pfs_admin.php +msgid "The node was saved." +msgstr "حُفظت العقدة." + +#: pfs_admin.php +msgid "The node was deleted. Targets it reported keep their history." +msgstr "حُذفت العقدة. تحتفظ الأهداف التي أبلغت عنها بسجلها التاريخي." + +#: pfs_admin.php +msgid "Enter a network as an address and prefix length, such as 10.20.0.0/16." +msgstr "أدخل الشبكة بعنوان وطول بادئة، مثل 10.20.0.0/16." + +#: pfs_admin.php +msgid "No device was added: the filesystem already has one, or the templates are not installed." +msgstr "لم يُضف جهاز: لنظام الملفات جهاز بالفعل، أو أن القوالب غير مثبتة." + +#: pfs_admin.php +msgid "The device could not be mapped. It may be mapped to another filesystem." +msgstr "تعذر ربط الجهاز. قد يكون مرتبطًا بنظام ملفات آخر." + +#: pfs_admin.php +msgid "The device was mapped and the data queries and overview graphs were added." +msgstr "رُبط الجهاز وأُضيفت استعلامات البيانات ورسوم النظرة العامة." + +#: pfs_admin.php +msgid "Cacti did not create the device. See the Cacti log." +msgstr "لم ينشئ Cacti الجهاز. راجع سجل Cacti." + +#: pfs_admin.php +msgid "The device, its data queries, and its overview graphs were created." +msgstr "أُنشئ الجهاز واستعلاماته ورسوم النظرة العامة الخاصة به." + +#: pfs_admin.php +msgid "The device is no longer mapped. It and its graphs were kept; its data queries list no targets until it is mapped again." +msgstr "أُلغي ربط الجهاز. حُفظ الجهاز ورسومه؛ ولا تسرد استعلاماته أهدافًا حتى يُربط مجددًا." + +#: pfs_health.php +msgid "The templates and data query files were installed." +msgstr "ثُبتت القوالب وملفات استعلام البيانات." + +#: pfs_health.php +#, php-format +msgid "The templates could not be installed: %s" +msgstr "تعذر تثبيت القوالب: %s" + +#: pfs_operator.php +msgid "Monitoring view" +msgstr "عرض المراقبة" + +#: pfs_operator.php +msgid "Observations could not be read. Ask an administrator to check the plugin log." +msgstr "تعذرت قراءة الملاحظات. اطلب من مسؤول مراجعة سجل الإضافة." + +#: setup.php +#, php-format +msgid "The Parallel Filesystem plugin requires PHP %s or later. This server runs PHP %s, so the plugin was not installed or enabled." +msgstr "تتطلب إضافة أنظمة الملفات المتوازية PHP %s أو أحدث. يعمل الخادم بالإصدار PHP %s، لذا لم تُثبّت الإضافة أو تُفعّل." + +#: setup.php +msgid "The Parallel Filesystem plugin is not enabled." +msgstr "إضافة أنظمة الملفات المتوازية غير مفعّلة." + +#: setup.php +#, php-format +msgid "The Parallel Filesystem plugin requires PHP %s or later." +msgstr "تتطلب إضافة أنظمة الملفات المتوازية PHP %s أو أحدث." + +#: setup.php +msgid "Management" +msgstr "الإدارة" diff --git a/locales/po/cacti.pot b/locales/po/cacti.pot index 02f4333..9b210a2 100644 --- a/locales/po/cacti.pot +++ b/locales/po/cacti.pot @@ -16,6 +16,10 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +#: include/operator.php +msgid "Inspect target capacity, imbalance and freshness on Parallel Filesystems. Escalate node access, target acceptance and device mapping to an administrator." +msgstr "" + #: lib/AccessMethod.php msgid "SSH forced command" msgstr "" @@ -24,7 +28,7 @@ msgstr "" msgid "Filesystems" msgstr "" -#: lib/AdminPage.php +#: lib/AdminPage.php lib/OperatorPage.php msgid "Actions" msgstr "" @@ -52,7 +56,7 @@ msgstr "" msgid "Poller" msgstr "" -#: lib/AdminPage.php +#: lib/AdminPage.php lib/OperatorPage.php msgid "State" msgstr "" @@ -287,7 +291,7 @@ msgstr "" msgid "Expected Interval: enter whole seconds from %d to %d." msgstr "" -#: lib/Format.php +#: lib/Format.php lib/OperatorPage.php msgid "Never" msgstr "" @@ -531,6 +535,46 @@ msgstr "" msgid "Client" msgstr "" +#: lib/OperatorPage.php +msgid "Review the recorded observations below. Acknowledgments are personal to this session, expire when observations change, and never suppress alerts or change health." +msgstr "" + +#: lib/OperatorPage.php lib/Pages.php +msgid "Parallel Filesystem Operations" +msgstr "" + +#: lib/OperatorPage.php +msgid "Investigation" +msgstr "" + +#: lib/OperatorPage.php +msgid "Object" +msgstr "" + +#: lib/OperatorPage.php +msgid "Observed (UTC)" +msgstr "" + +#: lib/OperatorPage.php +msgid "Unknown or stale" +msgstr "" + +#: lib/OperatorPage.php +msgid "Acknowledged; health unchanged." +msgstr "" + +#: lib/OperatorPage.php +msgid "Acknowledge" +msgstr "" + +#: lib/OperatorPage.php +msgid "No observations are available for devices you may access." +msgstr "" + +#: lib/Pages.php +msgid "Parallel Filesystem Operator" +msgstr "" + #: lib/Pages.php msgid "Parallel Filesystem View" msgstr "" @@ -805,6 +849,14 @@ msgstr "" msgid "The templates could not be installed: %s" msgstr "" +#: pfs_operator.php +msgid "Monitoring view" +msgstr "" + +#: pfs_operator.php +msgid "Observations could not be read. Ask an administrator to check the plugin log." +msgstr "" + #: setup.php #, php-format msgid "The Parallel Filesystem plugin requires PHP %s or later. This server runs PHP %s, so the plugin was not installed or enabled." diff --git a/locales/po/es-419.po b/locales/po/es-419.po new file mode 100644 index 0000000..69afd9e --- /dev/null +++ b/locales/po/es-419.po @@ -0,0 +1,874 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: 2026 Thomas Vincent +# +msgid "" +msgstr "" +"Project-Id-Version: pfs 0.1.0\n" +"Report-Msgid-Bugs-To: https://github.com/somethingwithproof/plugin_pfs/issues\n" +"PO-Revision-Date: 2026-11-17 00:00+0000\n" +"Last-Translator: Thomas Vincent \n" +"Language-Team: Thomas Vincent \n" +"Language: es-419\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: include/operator.php +msgid "Inspect target capacity, imbalance and freshness on Parallel Filesystems. Escalate node access, target acceptance and device mapping to an administrator." +msgstr "Revise capacidad, desequilibrio y actualidad de los destinos en Sistemas de archivos paralelos. Remita el acceso a nodos, la aceptación de destinos y la asignación de dispositivos a un administrador." + +#: lib/AccessMethod.php +msgid "SSH forced command" +msgstr "Comando forzado SSH" + +#: lib/AdminPage.php +msgid "Filesystems" +msgstr "Sistemas de archivos" + +#: lib/AdminPage.php lib/OperatorPage.php +msgid "Actions" +msgstr "Acciones" + +#: lib/AdminPage.php +msgid "Backend" +msgstr "Motor" + +#: lib/AdminPage.php +msgid "Cacti Device" +msgstr "Dispositivo Cacti" + +#: lib/AdminPage.php +msgid "Expected Interval" +msgstr "Intervalo previsto" + +#: lib/AdminPage.php +msgid "Name" +msgstr "Nombre" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Nodes" +msgstr "Nodos" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Poller" +msgstr "Sondeador" + +#: lib/AdminPage.php lib/OperatorPage.php +msgid "State" +msgstr "Estado" + +#: lib/AdminPage.php lib/TargetsPage.php +msgid "No filesystems registered yet." +msgstr "Aún no hay sistemas de archivos registrados." + +#: lib/AdminPage.php +#, php-format +msgid "%d seconds" +msgstr "%d segundos" + +#: lib/AdminPage.php +msgid "Delete" +msgstr "Eliminar" + +#: lib/AdminPage.php +msgid "Access" +msgstr "Acceso" + +#: lib/AdminPage.php +msgid "Endpoint" +msgstr "Punto de conexión" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Filesystem" +msgstr "Sistema de archivos" + +#: lib/AdminPage.php +msgid "Login Name" +msgstr "Nombre de inicio de sesión" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Role" +msgstr "Rol" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "No nodes registered yet." +msgstr "Aún no hay nodos registrados." + +#: lib/AdminPage.php +msgid "Register a filesystem first." +msgstr "Registre primero un sistema de archivos." + +#: lib/AdminPage.php +msgid "Export" +msgstr "Exportar" + +#: lib/AdminPage.php +msgid "Download the registry (filesystems, nodes, networks, and target review) as JSON before an uninstall that drops the plugin tables. It holds no key or credential." +msgstr "Antes de desinstalar eliminando las tablas, descargue como JSON el registro de sistemas de archivos, nodos, redes y revisión de destinos. No contiene claves ni credenciales." + +#: lib/AdminPage.php +#, php-format +msgid "Filesystem: %s" +msgstr "Sistema de archivos: %s" + +#: lib/AdminPage.php +msgid "New Filesystem" +msgstr "Nuevo sistema de archivos" + +#: lib/AdminPage.php +msgid "Expected Interval (seconds)" +msgstr "Intervalo previsto (segundos)" + +#: lib/AdminPage.php +msgid "Enabled" +msgstr "Activado" + +#: lib/AdminPage.php +msgid "New Node" +msgstr "Nuevo nodo" + +#: lib/AdminPage.php +#, php-format +msgid "Node: %s" +msgstr "Nodo: %s" + +#: lib/AdminPage.php +msgid "Endpoint (host name or address)" +msgstr "Punto de conexión (nombre de host o dirección)" + +#: lib/AdminPage.php +msgid "SSH Port" +msgstr "Puerto SSH" + +#: lib/AdminPage.php +msgid "The node must list the reader key in authorized_keys for this login with a forced command running pfs-read.sh, for example: restrict,command=\"/usr/local/libexec/pfs-read.sh\" followed by the public key. The host key must be in the known hosts file under the endpoint as written here." +msgstr "El nodo debe incluir la clave del lector en authorized_keys para este usuario con un comando forzado que ejecute pfs-read.sh, por ejemplo restrict,command=\"/usr/local/libexec/pfs-read.sh\" seguido de la clave pública. La clave del host debe figurar en el archivo de hosts conocidos bajo el punto de conexión escrito aquí." + +#: lib/AdminPage.php +#, php-format +msgid "Cacti Device for Filesystem %s" +msgstr "Dispositivo Cacti para el sistema de archivos %s" + +#: lib/AdminPage.php +msgid "Create a new device" +msgstr "Crear un dispositivo nuevo" + +#: lib/AdminPage.php +msgid "Device" +msgstr "Dispositivo" + +#: lib/AdminPage.php +msgid "Show What Will Be Added" +msgstr "Mostrar lo que se agregará" + +#: lib/AdminPage.php +msgid "Objects to Add" +msgstr "Objetos que se agregarán" + +#: lib/AdminPage.php +msgid "The device keeps its own settings, poller included. Nothing on it is changed or removed." +msgstr "El dispositivo conserva su configuración, incluido el sondeador. No se cambia ni elimina nada de él." + +#: lib/AdminPage.php +msgid "Per-target graphs are created on demand from the device's New Graphs page." +msgstr "Los gráficos por destino se crean cuando se solicitan desde la página Nuevos gráficos del dispositivo." + +#: lib/AdminPage.php +msgid "Create the Device" +msgstr "Crear el dispositivo" + +#: lib/AdminPage.php +msgid "Map This Device" +msgstr "Asignar este dispositivo" + +#: lib/AdminPage.php +msgid "Allowed Networks" +msgstr "Redes permitidas" + +#: lib/AdminPage.php +msgid "Network" +msgstr "Red" + +#: lib/AdminPage.php +msgid "No networks allowed yet. A poller reaches no node until its networks are listed here." +msgstr "Aún no hay redes permitidas. El sondeador no accede a ningún nodo hasta que sus redes figuren aquí." + +#: lib/AdminPage.php +msgid "Allow" +msgstr "Permitir" + +#: lib/AdminPage.php +msgid "Targets Awaiting Review" +msgstr "Destinos pendientes de revisión" + +#: lib/AdminPage.php lib/TargetsPage.php +msgid "Presence" +msgstr "Presencia" + +#: lib/AdminPage.php lib/TargetsPage.php +msgid "Target" +msgstr "Destino" + +#: lib/AdminPage.php +msgid "Values It Adds" +msgstr "Valores que agrega" + +#: lib/AdminPage.php +msgid "Accept" +msgstr "Aceptar" + +#: lib/AdminPage.php +msgid "Ignore" +msgstr "Ignorar" + +#: lib/AdminPage.php +msgid "No targets await review." +msgstr "No hay destinos pendientes de revisión." + +#: lib/AdminPage.php +msgid "Add a device" +msgstr "Agregar un dispositivo" + +#: lib/AdminPage.php +#, php-format +msgid "(polled by poller %d, not %d)" +msgstr "(sondeado por %d, no por %d)" + +#: lib/AdminPage.php +msgid "Unmap" +msgstr "Desasignar" + +#: lib/AdminPage.php +msgid "Save" +msgstr "Guardar" + +#: lib/DeviceProvisioner.php +msgid "The Parallel Filesystem templates are not installed. Reinstall them from the health page." +msgstr "Las plantillas de Sistemas de archivos paralelos no están instaladas. Reinstálelas desde la página de estado." + +#: lib/DeviceProvisioner.php +#, php-format +msgid "A device \"%s\" from the %s device template, polled by poller %d, with availability checks off." +msgstr "Un dispositivo «%s» de la plantilla %s, sondeado por %d y con las comprobaciones de disponibilidad desactivadas." + +#: lib/DeviceProvisioner.php +#, php-format +msgid "The data query \"%s\", listing %d targets known now. It creates no graph by itself." +msgstr "La consulta de datos «%s», que enumera %d destinos conocidos ahora. No crea gráficos por sí sola." + +#: lib/DeviceProvisioner.php +#, php-format +msgid "The graph \"%s\"." +msgstr "El gráfico «%s»." + +#: lib/DeviceProvisioner.php +#, php-format +msgid "A \"%s\" data source for each of those graphs, each one script server call per poll cycle, whatever the number of targets." +msgstr "Una fuente de datos «%s» para cada gráfico, con una llamada al servidor de scripts por ciclo de sondeo, independientemente del número de destinos." + +#: lib/DeviceProvisioner.php +#, php-format +msgid "Created by the Parallel Filesystem plugin for filesystem %s. Its values come from the plugin cache; the host name is a reserved name that is never contacted." +msgstr "Creado por el complemento de Sistemas de archivos paralelos para %s. Los valores proceden de su caché; el nombre de host está reservado y nunca se contacta." + +#: lib/FilesystemInput.php +msgid "Backend: choose one of the listed backends." +msgstr "Motor: elija uno de los motores enumerados." + +#: lib/FilesystemInput.php +msgid "Name: use the filesystem name the nodes print, such as the Lustre fsname of at most 8 letters, digits, dashes, or underscores." +msgstr "Nombre: use el nombre que imprimen los nodos, como el fsname de Lustre, de hasta 8 letras, dígitos, guiones o guiones bajos." + +#: lib/FilesystemInput.php lib/NodeInput.php +msgid "Poller: choose one of the listed pollers." +msgstr "Sondeador: elija uno de los sondeadores enumerados." + +#: lib/FilesystemInput.php +#, php-format +msgid "Expected Interval: enter whole seconds from %d to %d." +msgstr "Intervalo previsto: ingrese segundos enteros entre %d y %d." + +#: lib/Format.php lib/OperatorPage.php +msgid "Never" +msgstr "Nunca" + +#: lib/Format.php +#, php-format +msgid "%d seconds ago" +msgstr "Hace %d segundos" + +#: lib/Format.php +#, php-format +msgid "%d minutes ago" +msgstr "Hace %d minutos" + +#: lib/Format.php +#, php-format +msgid "%d hours ago" +msgstr "Hace %d horas" + +#: lib/Format.php +#, php-format +msgid "%d days ago" +msgstr "Hace %d días" + +#: lib/Format.php +#, php-format +msgid "%d B" +msgstr "%d B" + +#: lib/Format.php +#, php-format +msgid "%s KiB" +msgstr "%s KiB" + +#: lib/Format.php +#, php-format +msgid "%s MiB" +msgstr "%s MiB" + +#: lib/GraphLinks.php +#, php-format +msgid "Parallel Filesystem view of %s" +msgstr "Vista de sistemas de archivos paralelos de %s" + +#: lib/HealthPage.php +msgid "Parallel Filesystem Warnings" +msgstr "Advertencias de sistemas de archivos paralelos" + +#: lib/HealthPage.php +msgid "No warnings." +msgstr "Sin advertencias." + +#: lib/HealthPage.php +msgid "Install the Templates Again" +msgstr "Volver a instalar las plantillas" + +#: lib/HealthPage.php +msgid "Readers" +msgstr "Lectores" + +#: lib/HealthPage.php +msgid "Failed" +msgstr "Fallido" + +#: lib/HealthPage.php +msgid "Last Completed Run" +msgstr "Última ejecución completada" + +#: lib/HealthPage.php +msgid "Last Run" +msgstr "Última ejecución" + +#: lib/HealthPage.php +msgid "Not Reached" +msgstr "No alcanzado" + +#: lib/HealthPage.php +msgid "Read" +msgstr "Leído" + +#: lib/HealthPage.php +msgid "No reader has run yet." +msgstr "Todavía no se ha ejecutado ningún lector." + +#: lib/HealthPage.php +msgid "Duration" +msgstr "Duración" + +#: lib/HealthPage.php +msgid "Failure" +msgstr "Fallo" + +#: lib/HealthPage.php +msgid "Last Read" +msgstr "Última lectura" + +#: lib/HealthPage.php +msgid "Last Success" +msgstr "Último éxito" + +#: lib/HealthPage.php +msgid "Node" +msgstr "Nodo" + +#: lib/HealthPage.php +msgid "Reported Version" +msgstr "Versión notificada" + +#: lib/HealthPage.php +msgid "Response Size" +msgstr "Tamaño de respuesta" + +#: lib/HealthPage.php +msgid "disabled" +msgstr "desactivado" + +#: lib/HealthPage.php +#, php-format +msgid "%s s" +msgstr "%s s" + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the node answered without the fixed read script framing. Its key may not be limited to a forced command running pfs-read.sh." +msgstr "%s: el nodo respondió sin el formato delimitado del script de lectura fijo. Puede que su clave no esté limitada al comando forzado que ejecuta pfs-read.sh." + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the node host key is not in the known hosts file, or it changed. Check the key before adding it." +msgstr "%s: la clave del host no está en el archivo de hosts conocidos o ha cambiado. Verifíquela antes de agregarla." + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the endpoint resolves outside the networks allowed for poller %d, so it is not read." +msgstr "%s: el punto de conexión se resuelve fuera de las redes permitidas para el sondeador %d, por lo que no se lee." + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the read script printed %d parameters the plugin does not read, so it is not the shipped pfs-read.sh. The node may be exposing more than the plugin needs." +msgstr "%s: el script imprimió %d parámetros que el complemento no lee, por lo que no es el pfs-read.sh distribuido. El nodo puede estar exponiendo más información de la necesaria." + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: %d target names in the node output did not match the expected pattern or filesystem and were ignored." +msgstr "%s: se ignoraron %d nombres de destino de la salida del nodo que no coincidían con el patrón o el sistema de archivos esperado." + +#: lib/HealthWarnings.php +#, php-format +msgid "The reader on poller %d has not completed a run in the last %d seconds. Values from its nodes are getting stale." +msgstr "El lector del sondeador %d no ha completado ninguna ejecución en los últimos %d segundos. Los valores de sus nodos están quedando obsoletos." + +#: lib/HealthWarnings.php +#, php-format +msgid "Installing the Parallel Filesystem templates failed: %s" +msgstr "Falló la instalación de las plantillas de Sistemas de archivos paralelos: %s" + +#: lib/HealthWarnings.php +msgid "The Parallel Filesystem templates are not installed, so no device can be added." +msgstr "Las plantillas no están instaladas, por lo que no se pueden agregar dispositivos." + +#: lib/HealthWarnings.php +#, php-format +msgid "The data query file resource/script_server/%s is missing from Cacti or differs from the one this plugin ships, so the data queries cannot list targets." +msgstr "El archivo de consulta resource/script_server/%s falta en Cacti o difiere del distribuido por el complemento; las consultas no pueden enumerar destinos." + +#: lib/HealthWarnings.php +#, php-format +msgid "Filesystem %s is mapped to device %d, which no longer exists." +msgstr "El sistema de archivos %s está asignado al dispositivo %d, que ya no existe." + +#: lib/HealthWarnings.php +#, php-format +msgid "The device of filesystem %s is polled by poller %d, but its nodes are read by poller %d, whose cache the device's data sources need." +msgstr "El dispositivo del sistema %s usa el sondeador %d, pero sus nodos los lee el sondeador %d, cuya caché necesitan las fuentes de datos del dispositivo." + +#: lib/HealthWarnings.php +#, php-format +msgid "The SSH key file %s does not exist on this server." +msgstr "El archivo de clave SSH %s no existe en este servidor." + +#: lib/HealthWarnings.php +#, php-format +msgid "The SSH key file %s can be read or written by users other than its owner (mode %s). Limit it to the poller user." +msgstr "Otros usuarios distintos del propietario pueden leer o escribir el archivo de clave SSH %s (modo %s). Limítelo al usuario del sondeador." + +#: lib/HealthWarnings.php +#, php-format +msgid "The known hosts file %s does not exist on this server, so no node can be read from it." +msgstr "El archivo de hosts conocidos %s no existe en este servidor, por lo que no se puede leer ningún nodo." + +#: lib/HealthWarnings.php +#, php-format +msgid "The SSH client %s does not exist on this server." +msgstr "El cliente SSH %s no existe en este servidor." + +#: lib/NodeInput.php +msgid "Filesystem: choose one of the registered filesystems." +msgstr "Sistema de archivos: elija uno de los sistemas registrados." + +#: lib/NodeInput.php +msgid "Name: use 1 to 64 letters, digits, dots, dashes, or underscores, starting with a letter or digit." +msgstr "Nombre: use de 1 a 64 letras, dígitos, puntos, guiones o guiones bajos, empezando por una letra o un dígito." + +#: lib/NodeInput.php +msgid "Role: choose one of the listed roles." +msgstr "Rol: elija uno de los roles enumerados." + +#: lib/NodeInput.php +msgid "Port: enter a port from 1 to 65535." +msgstr "Puerto: ingrese un puerto entre 1 y 65535." + +#: lib/NodeInput.php +msgid "Login Name: use a lower-case account name of at most 32 characters, starting with a letter or underscore." +msgstr "Nombre de inicio de sesión: use un nombre de cuenta en minúsculas de hasta 32 caracteres, empezando por una letra o un guion bajo." + +#: lib/NodeInput.php +msgid "Endpoint: enter a host name or an IP address only, without a user, port, or path." +msgstr "Punto de conexión: ingrese solo un nombre de host o dirección IP, sin usuario, puerto ni ruta." + +#: lib/NodeInput.php +msgid "Endpoint: the name does not resolve on this server." +msgstr "Punto de conexión: el nombre no se resuelve en este servidor." + +#: lib/NodeInput.php +#, php-format +msgid "Endpoint: it resolves to %s, which is not inside the networks allowed for this poller. Add the network first." +msgstr "Punto de conexión: se resuelve a %s, fuera de las redes permitidas para este sondeador. Agregue primero la red." + +#: lib/NodeRole.php +msgid "Management server (MGS)" +msgstr "Servidor de gestión (MGS)" + +#: lib/NodeRole.php +msgid "Metadata server (MDS)" +msgstr "Servidor de metadatos (MDS)" + +#: lib/NodeRole.php +msgid "Object storage server (OSS)" +msgstr "Servidor de almacenamiento de objetos (OSS)" + +#: lib/NodeRole.php +msgid "Client" +msgstr "Cliente" + +#: lib/OperatorPage.php +msgid "Review the recorded observations below. Acknowledgments are personal to this session, expire when observations change, and never suppress alerts or change health." +msgstr "Revise las observaciones registradas a continuación. Los acuses de recibo son personales y exclusivos de esta sesión, caducan cuando cambian las observaciones y no suprimen alertas ni modifican el estado de salud." + +#: lib/OperatorPage.php lib/Pages.php +msgid "Parallel Filesystem Operations" +msgstr "Operaciones de sistemas de archivos paralelos" + +#: lib/OperatorPage.php +msgid "Investigation" +msgstr "Investigación" + +#: lib/OperatorPage.php +msgid "Object" +msgstr "Objeto" + +#: lib/OperatorPage.php +msgid "Observed (UTC)" +msgstr "Observado (UTC)" + +#: lib/OperatorPage.php +msgid "Unknown or stale" +msgstr "Desconocido o desactualizado" + +#: lib/OperatorPage.php +msgid "Acknowledged; health unchanged." +msgstr "Acuse de recibo registrado; estado de salud sin cambios." + +#: lib/OperatorPage.php +msgid "Acknowledge" +msgstr "Acusar recibo" + +#: lib/OperatorPage.php +msgid "No observations are available for devices you may access." +msgstr "No hay observaciones disponibles para los dispositivos a los que tiene acceso." + +#: lib/Pages.php +msgid "Parallel Filesystem Operator" +msgstr "Operador de sistemas de archivos paralelos" + +#: lib/Pages.php +msgid "Parallel Filesystem View" +msgstr "Vista de sistemas de archivos paralelos" + +#: lib/Pages.php +msgid "Parallel Filesystem Admin" +msgstr "Administración de sistemas de archivos paralelos" + +#: lib/Pages.php lib/TargetsPage.php setup.php +msgid "Parallel Filesystems" +msgstr "Sistemas de archivos paralelos" + +#: lib/Pages.php +msgid "Parallel Filesystem Registry" +msgstr "Registro de sistemas de archivos paralelos" + +#: lib/Pages.php +msgid "Parallel Filesystem Health" +msgstr "Estado de sistemas de archivos paralelos" + +#: lib/ReadError.php +msgid "The plugin settings for node access are incomplete or unusable" +msgstr "La configuración de acceso a nodos está incompleta o no se puede usar" + +#: lib/ReadError.php +msgid "The endpoint resolves outside the networks allowed for its poller" +msgstr "El punto de conexión se resuelve fuera de las redes permitidas para su sondeador" + +#: lib/ReadError.php +msgid "The endpoint name does not resolve" +msgstr "El nombre del punto de conexión no se resuelve" + +#: lib/ReadError.php +msgid "The node could not be reached" +msgstr "No se pudo alcanzar el nodo" + +#: lib/ReadError.php +msgid "The node host key is unknown or changed" +msgstr "La clave del host es desconocida o ha cambiado" + +#: lib/ReadError.php +msgid "The node refused the key" +msgstr "El nodo rechazó la clave" + +#: lib/ReadError.php +msgid "The read exceeded its time limit" +msgstr "La lectura superó el límite de tiempo" + +#: lib/ReadError.php +msgid "The response exceeded the size limit" +msgstr "La respuesta superó el límite de tamaño" + +#: lib/ReadError.php +msgid "The read command failed" +msgstr "Falló el comando de lectura" + +#: lib/ReadError.php +msgid "The node did not answer with the fixed read script" +msgstr "El nodo no respondió con el script de lectura fijo" + +#: lib/ReadError.php +msgid "The response ended before the read script finished" +msgstr "La respuesta terminó antes de finalizar el script de lectura" + +#: lib/Settings.php +msgid "Node Access" +msgstr "Acceso a nodos" + +#: lib/Settings.php +msgid "Absolute path to the ssh client on each poller that reads nodes." +msgstr "Ruta absoluta del cliente ssh en cada sondeador que lee nodos." + +#: lib/Settings.php +msgid "SSH Client" +msgstr "Cliente SSH" + +#: lib/Settings.php +msgid "Absolute path, on each poller that reads nodes, to the private key whose public half each node lists in authorized_keys with a forced command running pfs-read.sh. Readable only by the poller user. The plugin never creates, copies, or prints it." +msgstr "Ruta absoluta, en cada sondeador lector, de la clave privada cuya parte pública figura en authorized_keys de cada nodo con un comando forzado que ejecuta pfs-read.sh. Solo debe leerla el usuario del sondeador. El complemento nunca la crea, copia ni imprime." + +#: lib/Settings.php +msgid "SSH Key File" +msgstr "Archivo de clave SSH" + +#: lib/Settings.php +msgid "Absolute path to the known_hosts file holding each node host key under the node endpoint name. A node whose key is missing or changed is not read." +msgstr "Ruta absoluta de known_hosts, que contiene la clave de cada nodo bajo su nombre de punto de conexión. No se lee un nodo cuya clave falte o haya cambiado." + +#: lib/Settings.php +msgid "Known Hosts File" +msgstr "Archivo de hosts conocidos" + +#: lib/Settings.php +msgid "Connect Timeout" +msgstr "Tiempo de espera de conexión" + +#: lib/Settings.php +msgid "Seconds to wait for a node to accept the connection." +msgstr "Segundos que se espera a que un nodo acepte la conexión." + +#: lib/Settings.php +msgid "Read Timeout" +msgstr "Tiempo de espera de lectura" + +#: lib/Settings.php +msgid "Seconds one node read may take in total before it is stopped and recorded as failed." +msgstr "Segundos máximos para leer un nodo antes de detener la lectura y registrarla como fallida." + +#: lib/Settings.php +msgid "KiB one node may return. A larger answer is discarded and recorded as failed." +msgstr "KiB que puede devolver un nodo. Una respuesta mayor se descarta y se registra como fallida." + +#: lib/Settings.php +msgid "Maximum Response" +msgstr "Respuesta máxima" + +#: lib/Settings.php +msgid "Reader" +msgstr "Lector" + +#: lib/Settings.php +msgid "Reader Time Budget" +msgstr "Presupuesto de tiempo del lector" + +#: lib/Settings.php +msgid "Seconds one reader run may spend before it stops starting node reads. Keep it below the poller interval; unread nodes are read on the next run." +msgstr "Segundos disponibles para una ejecución del lector antes de dejar de iniciar lecturas. Manténgalos por debajo del intervalo de sondeo; los nodos pendientes se leen en la próxima ejecución." + +#: lib/Settings.php +msgid "Concurrent Reads" +msgstr "Lecturas simultáneas" + +#: lib/Settings.php +msgid "Node reads one reader runs at the same time." +msgstr "Lecturas de nodos que un lector ejecuta al mismo tiempo." + +#: lib/Settings.php +msgid "Uninstall" +msgstr "Desinstalar" + +#: lib/Settings.php +msgid "Keep Plugin Tables on Uninstall" +msgstr "Conservar tablas al desinstalar" + +#: lib/Settings.php +msgid "When checked, uninstalling the plugin keeps its filesystems, nodes, inventory, and cache. Clear it to have the uninstall drop them; export the registry first from the Parallel Filesystem Admin page. Storage nodes are never contacted either way." +msgstr "Si está marcado, la desinstalación conserva sistemas de archivos, nodos, inventario y caché. Desmárquelo para eliminarlos; exporte antes el registro desde Administración de sistemas de archivos paralelos. Nunca se contacta con los nodos de almacenamiento." + +#: lib/Settings.php +msgid "Delete the Devices This Plugin Created on Uninstall" +msgstr "Eliminar al desinstalar los dispositivos creados por este plugin" + +#: lib/Settings.php +msgid "When checked, uninstalling the plugin deletes the devices it created for filesystems, with their graphs and data sources, as deleting them in Cacti would. Existing devices that were mapped to a filesystem are never deleted. RRD files are removed only if Cacti's own RRD cleanup setting removes them. Cleared, the devices stay." +msgstr "Si se marca, al desinstalar se eliminan los dispositivos creados por el plugin para los sistemas de archivos, junto con sus gráficos y fuentes de datos, como al borrarlos en Cacti. Nunca se eliminan dispositivos existentes asociados a un sistema. Los archivos RRD solo se eliminan si lo dispone el ajuste de limpieza RRD de Cacti. Sin marcar, se conservan los dispositivos." + +#: lib/TargetsPage.php +msgid "No filesystem is visible to you." +msgstr "No hay sistemas de archivos visibles para usted." + +#: lib/TargetsPage.php +#, php-format +msgid "Filesystem %s" +msgstr "Sistema de archivos %s" + +#: lib/TargetsPage.php +msgid "Graphs of this filesystem" +msgstr "Gráficos de este sistema de archivos" + +#: lib/TargetsPage.php +msgid "Condition" +msgstr "Condición" + +#: lib/TargetsPage.php +msgid "Freshness" +msgstr "Actualidad" + +#: lib/TargetsPage.php +msgid "Known Values" +msgstr "Valores conocidos" + +#: lib/TargetsPage.php +msgid "Last Seen" +msgstr "Última detección" + +#: lib/TargetsPage.php +msgid "Recovery" +msgstr "Recuperación" + +#: lib/TargetsPage.php +msgid "Review" +msgstr "Revisión" + +#: lib/TargetsPage.php +msgid "Source Node" +msgstr "Nodo de origen" + +#: lib/TargetsPage.php +msgid "No targets found yet." +msgstr "Aún no se han encontrado destinos." + +#: pfs_admin.php +msgid "That record belongs to a Cacti device you do not have permission for. Nothing was changed." +msgstr "Ese registro pertenece a un dispositivo Cacti para el que no tiene permiso. No se cambió nada." + +#: pfs_admin.php +msgid "Name: another filesystem of this backend already uses this name." +msgstr "Nombre: otro sistema de archivos de este motor ya usa ese nombre." + +#: pfs_admin.php +msgid "The filesystem could not be saved." +msgstr "No se pudo guardar el sistema de archivos." + +#: pfs_admin.php +msgid "The filesystem was saved." +msgstr "Se guardó el sistema de archivos." + +#: pfs_admin.php +msgid "The filesystem, its nodes, and its inventory were deleted. Its Cacti device, data sources, and graphs were kept. No node was contacted." +msgstr "Se eliminaron el sistema de archivos, sus nodos y su inventario. Se conservaron el dispositivo Cacti, las fuentes de datos y los gráficos. No se contactó con ningún nodo." + +#: pfs_admin.php +msgid "Name: another node already uses this name." +msgstr "Nombre: otro nodo ya usa ese nombre." + +#: pfs_admin.php +msgid "The node could not be saved." +msgstr "No se pudo guardar el nodo." + +#: pfs_admin.php +msgid "The node was saved." +msgstr "Se guardó el nodo." + +#: pfs_admin.php +msgid "The node was deleted. Targets it reported keep their history." +msgstr "Se eliminó el nodo. Los destinos que notificó conservan su historial." + +#: pfs_admin.php +msgid "Enter a network as an address and prefix length, such as 10.20.0.0/16." +msgstr "Ingrese una red como dirección y longitud de prefijo, por ejemplo 10.20.0.0/16." + +#: pfs_admin.php +msgid "No device was added: the filesystem already has one, or the templates are not installed." +msgstr "No se agregó ningún dispositivo: el sistema ya tiene uno o las plantillas no están instaladas." + +#: pfs_admin.php +msgid "The device could not be mapped. It may be mapped to another filesystem." +msgstr "No se pudo asignar el dispositivo. Puede estar asignado a otro sistema de archivos." + +#: pfs_admin.php +msgid "The device was mapped and the data queries and overview graphs were added." +msgstr "Se asignó el dispositivo y se agregaron las consultas y gráficos de resumen." + +#: pfs_admin.php +msgid "Cacti did not create the device. See the Cacti log." +msgstr "Cacti no creó el dispositivo. Consulte el registro de Cacti." + +#: pfs_admin.php +msgid "The device, its data queries, and its overview graphs were created." +msgstr "Se crearon el dispositivo, sus consultas y sus gráficos de resumen." + +#: pfs_admin.php +msgid "The device is no longer mapped. It and its graphs were kept; its data queries list no targets until it is mapped again." +msgstr "Se desasignó el dispositivo. Se conservó junto con sus gráficos; sus consultas no enumeran destinos hasta volver a asignarlo." + +#: pfs_health.php +msgid "The templates and data query files were installed." +msgstr "Se instalaron las plantillas y los archivos de consulta de datos." + +#: pfs_health.php +#, php-format +msgid "The templates could not be installed: %s" +msgstr "No se pudieron instalar las plantillas: %s" + +#: pfs_operator.php +msgid "Monitoring view" +msgstr "Vista de supervisión" + +#: pfs_operator.php +msgid "Observations could not be read. Ask an administrator to check the plugin log." +msgstr "No se pudieron leer las observaciones. Pida a un administrador que revise el registro del complemento." + +#: setup.php +#, php-format +msgid "The Parallel Filesystem plugin requires PHP %s or later. This server runs PHP %s, so the plugin was not installed or enabled." +msgstr "El complemento de Sistemas de archivos paralelos requiere PHP %s o posterior. Este servidor ejecuta PHP %s, por lo que no se instaló ni activó." + +#: setup.php +msgid "The Parallel Filesystem plugin is not enabled." +msgstr "El complemento de Sistemas de archivos paralelos no está activado." + +#: setup.php +#, php-format +msgid "The Parallel Filesystem plugin requires PHP %s or later." +msgstr "El complemento de Sistemas de archivos paralelos requiere PHP %s o posterior." + +#: setup.php +msgid "Management" +msgstr "Gestión" diff --git a/locales/po/es-ES.po b/locales/po/es-ES.po new file mode 100644 index 0000000..67c90c3 --- /dev/null +++ b/locales/po/es-ES.po @@ -0,0 +1,874 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: 2026 Thomas Vincent +# +msgid "" +msgstr "" +"Project-Id-Version: pfs 0.1.0\n" +"Report-Msgid-Bugs-To: https://github.com/somethingwithproof/plugin_pfs/issues\n" +"PO-Revision-Date: 2026-11-17 00:00+0000\n" +"Last-Translator: Thomas Vincent \n" +"Language-Team: Thomas Vincent \n" +"Language: es-ES\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: include/operator.php +msgid "Inspect target capacity, imbalance and freshness on Parallel Filesystems. Escalate node access, target acceptance and device mapping to an administrator." +msgstr "Revise capacidad, desequilibrio y actualidad de los destinos en Sistemas de archivos paralelos. Remita el acceso a nodos, la aceptación de destinos y la asignación de dispositivos a un administrador." + +#: lib/AccessMethod.php +msgid "SSH forced command" +msgstr "Comando forzado SSH" + +#: lib/AdminPage.php +msgid "Filesystems" +msgstr "Sistemas de archivos" + +#: lib/AdminPage.php lib/OperatorPage.php +msgid "Actions" +msgstr "Acciones" + +#: lib/AdminPage.php +msgid "Backend" +msgstr "Motor" + +#: lib/AdminPage.php +msgid "Cacti Device" +msgstr "Dispositivo Cacti" + +#: lib/AdminPage.php +msgid "Expected Interval" +msgstr "Intervalo previsto" + +#: lib/AdminPage.php +msgid "Name" +msgstr "Nombre" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Nodes" +msgstr "Nodos" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Poller" +msgstr "Sondeador" + +#: lib/AdminPage.php lib/OperatorPage.php +msgid "State" +msgstr "Estado" + +#: lib/AdminPage.php lib/TargetsPage.php +msgid "No filesystems registered yet." +msgstr "Aún no hay sistemas de archivos registrados." + +#: lib/AdminPage.php +#, php-format +msgid "%d seconds" +msgstr "%d segundos" + +#: lib/AdminPage.php +msgid "Delete" +msgstr "Eliminar" + +#: lib/AdminPage.php +msgid "Access" +msgstr "Acceso" + +#: lib/AdminPage.php +msgid "Endpoint" +msgstr "Punto de conexión" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Filesystem" +msgstr "Sistema de archivos" + +#: lib/AdminPage.php +msgid "Login Name" +msgstr "Nombre de inicio de sesión" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Role" +msgstr "Rol" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "No nodes registered yet." +msgstr "Aún no hay nodos registrados." + +#: lib/AdminPage.php +msgid "Register a filesystem first." +msgstr "Registre primero un sistema de archivos." + +#: lib/AdminPage.php +msgid "Export" +msgstr "Exportar" + +#: lib/AdminPage.php +msgid "Download the registry (filesystems, nodes, networks, and target review) as JSON before an uninstall that drops the plugin tables. It holds no key or credential." +msgstr "Antes de desinstalar eliminando las tablas, descargue como JSON el registro de sistemas de archivos, nodos, redes y revisión de destinos. No contiene claves ni credenciales." + +#: lib/AdminPage.php +#, php-format +msgid "Filesystem: %s" +msgstr "Sistema de archivos: %s" + +#: lib/AdminPage.php +msgid "New Filesystem" +msgstr "Nuevo sistema de archivos" + +#: lib/AdminPage.php +msgid "Expected Interval (seconds)" +msgstr "Intervalo previsto (segundos)" + +#: lib/AdminPage.php +msgid "Enabled" +msgstr "Activado" + +#: lib/AdminPage.php +msgid "New Node" +msgstr "Nuevo nodo" + +#: lib/AdminPage.php +#, php-format +msgid "Node: %s" +msgstr "Nodo: %s" + +#: lib/AdminPage.php +msgid "Endpoint (host name or address)" +msgstr "Punto de conexión (nombre de host o dirección)" + +#: lib/AdminPage.php +msgid "SSH Port" +msgstr "Puerto SSH" + +#: lib/AdminPage.php +msgid "The node must list the reader key in authorized_keys for this login with a forced command running pfs-read.sh, for example: restrict,command=\"/usr/local/libexec/pfs-read.sh\" followed by the public key. The host key must be in the known hosts file under the endpoint as written here." +msgstr "El nodo debe incluir la clave del lector en authorized_keys para este usuario con un comando forzado que ejecute pfs-read.sh, por ejemplo restrict,command=\"/usr/local/libexec/pfs-read.sh\" seguido de la clave pública. La clave del host debe figurar en el archivo de hosts conocidos bajo el punto de conexión escrito aquí." + +#: lib/AdminPage.php +#, php-format +msgid "Cacti Device for Filesystem %s" +msgstr "Dispositivo Cacti para el sistema de archivos %s" + +#: lib/AdminPage.php +msgid "Create a new device" +msgstr "Crear un dispositivo nuevo" + +#: lib/AdminPage.php +msgid "Device" +msgstr "Dispositivo" + +#: lib/AdminPage.php +msgid "Show What Will Be Added" +msgstr "Mostrar lo que se añadirá" + +#: lib/AdminPage.php +msgid "Objects to Add" +msgstr "Objetos que se añadirán" + +#: lib/AdminPage.php +msgid "The device keeps its own settings, poller included. Nothing on it is changed or removed." +msgstr "El dispositivo conserva su configuración, incluido el sondeador. No se cambia ni elimina nada de él." + +#: lib/AdminPage.php +msgid "Per-target graphs are created on demand from the device's New Graphs page." +msgstr "Los gráficos por destino se crean cuando se solicitan desde la página Nuevos gráficos del dispositivo." + +#: lib/AdminPage.php +msgid "Create the Device" +msgstr "Crear el dispositivo" + +#: lib/AdminPage.php +msgid "Map This Device" +msgstr "Asignar este dispositivo" + +#: lib/AdminPage.php +msgid "Allowed Networks" +msgstr "Redes permitidas" + +#: lib/AdminPage.php +msgid "Network" +msgstr "Red" + +#: lib/AdminPage.php +msgid "No networks allowed yet. A poller reaches no node until its networks are listed here." +msgstr "Aún no hay redes permitidas. El sondeador no accede a ningún nodo hasta que sus redes figuren aquí." + +#: lib/AdminPage.php +msgid "Allow" +msgstr "Permitir" + +#: lib/AdminPage.php +msgid "Targets Awaiting Review" +msgstr "Destinos pendientes de revisión" + +#: lib/AdminPage.php lib/TargetsPage.php +msgid "Presence" +msgstr "Presencia" + +#: lib/AdminPage.php lib/TargetsPage.php +msgid "Target" +msgstr "Destino" + +#: lib/AdminPage.php +msgid "Values It Adds" +msgstr "Valores que añade" + +#: lib/AdminPage.php +msgid "Accept" +msgstr "Aceptar" + +#: lib/AdminPage.php +msgid "Ignore" +msgstr "Ignorar" + +#: lib/AdminPage.php +msgid "No targets await review." +msgstr "No hay destinos pendientes de revisión." + +#: lib/AdminPage.php +msgid "Add a device" +msgstr "Añadir un dispositivo" + +#: lib/AdminPage.php +#, php-format +msgid "(polled by poller %d, not %d)" +msgstr "(sondeado por %d, no por %d)" + +#: lib/AdminPage.php +msgid "Unmap" +msgstr "Desasignar" + +#: lib/AdminPage.php +msgid "Save" +msgstr "Guardar" + +#: lib/DeviceProvisioner.php +msgid "The Parallel Filesystem templates are not installed. Reinstall them from the health page." +msgstr "Las plantillas de Sistemas de archivos paralelos no están instaladas. Reinstálelas desde la página de estado." + +#: lib/DeviceProvisioner.php +#, php-format +msgid "A device \"%s\" from the %s device template, polled by poller %d, with availability checks off." +msgstr "Un dispositivo «%s» de la plantilla %s, sondeado por %d y con las comprobaciones de disponibilidad desactivadas." + +#: lib/DeviceProvisioner.php +#, php-format +msgid "The data query \"%s\", listing %d targets known now. It creates no graph by itself." +msgstr "La consulta de datos «%s», que enumera %d destinos conocidos ahora. No crea gráficos por sí sola." + +#: lib/DeviceProvisioner.php +#, php-format +msgid "The graph \"%s\"." +msgstr "El gráfico «%s»." + +#: lib/DeviceProvisioner.php +#, php-format +msgid "A \"%s\" data source for each of those graphs, each one script server call per poll cycle, whatever the number of targets." +msgstr "Una fuente de datos «%s» para cada gráfico, con una llamada al servidor de scripts por ciclo de sondeo, independientemente del número de destinos." + +#: lib/DeviceProvisioner.php +#, php-format +msgid "Created by the Parallel Filesystem plugin for filesystem %s. Its values come from the plugin cache; the host name is a reserved name that is never contacted." +msgstr "Creado por el complemento de Sistemas de archivos paralelos para %s. Los valores proceden de su caché; el nombre de host está reservado y nunca se contacta." + +#: lib/FilesystemInput.php +msgid "Backend: choose one of the listed backends." +msgstr "Motor: elija uno de los motores enumerados." + +#: lib/FilesystemInput.php +msgid "Name: use the filesystem name the nodes print, such as the Lustre fsname of at most 8 letters, digits, dashes, or underscores." +msgstr "Nombre: use el nombre que imprimen los nodos, como el fsname de Lustre, de hasta 8 letras, dígitos, guiones o guiones bajos." + +#: lib/FilesystemInput.php lib/NodeInput.php +msgid "Poller: choose one of the listed pollers." +msgstr "Sondeador: elija uno de los sondeadores enumerados." + +#: lib/FilesystemInput.php +#, php-format +msgid "Expected Interval: enter whole seconds from %d to %d." +msgstr "Intervalo previsto: introduzca segundos enteros entre %d y %d." + +#: lib/Format.php lib/OperatorPage.php +msgid "Never" +msgstr "Nunca" + +#: lib/Format.php +#, php-format +msgid "%d seconds ago" +msgstr "Hace %d segundos" + +#: lib/Format.php +#, php-format +msgid "%d minutes ago" +msgstr "Hace %d minutos" + +#: lib/Format.php +#, php-format +msgid "%d hours ago" +msgstr "Hace %d horas" + +#: lib/Format.php +#, php-format +msgid "%d days ago" +msgstr "Hace %d días" + +#: lib/Format.php +#, php-format +msgid "%d B" +msgstr "%d B" + +#: lib/Format.php +#, php-format +msgid "%s KiB" +msgstr "%s KiB" + +#: lib/Format.php +#, php-format +msgid "%s MiB" +msgstr "%s MiB" + +#: lib/GraphLinks.php +#, php-format +msgid "Parallel Filesystem view of %s" +msgstr "Vista de sistemas de archivos paralelos de %s" + +#: lib/HealthPage.php +msgid "Parallel Filesystem Warnings" +msgstr "Advertencias de sistemas de archivos paralelos" + +#: lib/HealthPage.php +msgid "No warnings." +msgstr "Sin advertencias." + +#: lib/HealthPage.php +msgid "Install the Templates Again" +msgstr "Volver a instalar las plantillas" + +#: lib/HealthPage.php +msgid "Readers" +msgstr "Lectores" + +#: lib/HealthPage.php +msgid "Failed" +msgstr "Fallido" + +#: lib/HealthPage.php +msgid "Last Completed Run" +msgstr "Última ejecución completada" + +#: lib/HealthPage.php +msgid "Last Run" +msgstr "Última ejecución" + +#: lib/HealthPage.php +msgid "Not Reached" +msgstr "No alcanzado" + +#: lib/HealthPage.php +msgid "Read" +msgstr "Leído" + +#: lib/HealthPage.php +msgid "No reader has run yet." +msgstr "Todavía no se ha ejecutado ningún lector." + +#: lib/HealthPage.php +msgid "Duration" +msgstr "Duración" + +#: lib/HealthPage.php +msgid "Failure" +msgstr "Fallo" + +#: lib/HealthPage.php +msgid "Last Read" +msgstr "Última lectura" + +#: lib/HealthPage.php +msgid "Last Success" +msgstr "Último éxito" + +#: lib/HealthPage.php +msgid "Node" +msgstr "Nodo" + +#: lib/HealthPage.php +msgid "Reported Version" +msgstr "Versión notificada" + +#: lib/HealthPage.php +msgid "Response Size" +msgstr "Tamaño de respuesta" + +#: lib/HealthPage.php +msgid "disabled" +msgstr "desactivado" + +#: lib/HealthPage.php +#, php-format +msgid "%s s" +msgstr "%s s" + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the node answered without the fixed read script framing. Its key may not be limited to a forced command running pfs-read.sh." +msgstr "%s: el nodo respondió sin el formato delimitado del script de lectura fijo. Puede que su clave no esté limitada al comando forzado que ejecuta pfs-read.sh." + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the node host key is not in the known hosts file, or it changed. Check the key before adding it." +msgstr "%s: la clave del host no está en el archivo de hosts conocidos o ha cambiado. Verifíquela antes de añadirla." + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the endpoint resolves outside the networks allowed for poller %d, so it is not read." +msgstr "%s: el punto de conexión se resuelve fuera de las redes permitidas para el sondeador %d, por lo que no se lee." + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the read script printed %d parameters the plugin does not read, so it is not the shipped pfs-read.sh. The node may be exposing more than the plugin needs." +msgstr "%s: el script imprimió %d parámetros que el complemento no lee, por lo que no es el pfs-read.sh distribuido. El nodo puede estar exponiendo más información de la necesaria." + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: %d target names in the node output did not match the expected pattern or filesystem and were ignored." +msgstr "%s: se ignoraron %d nombres de destino de la salida del nodo que no coincidían con el patrón o el sistema de archivos esperado." + +#: lib/HealthWarnings.php +#, php-format +msgid "The reader on poller %d has not completed a run in the last %d seconds. Values from its nodes are getting stale." +msgstr "El lector del sondeador %d no ha completado ninguna ejecución en los últimos %d segundos. Los valores de sus nodos están quedando obsoletos." + +#: lib/HealthWarnings.php +#, php-format +msgid "Installing the Parallel Filesystem templates failed: %s" +msgstr "Falló la instalación de las plantillas de Sistemas de archivos paralelos: %s" + +#: lib/HealthWarnings.php +msgid "The Parallel Filesystem templates are not installed, so no device can be added." +msgstr "Las plantillas no están instaladas, por lo que no se pueden añadir dispositivos." + +#: lib/HealthWarnings.php +#, php-format +msgid "The data query file resource/script_server/%s is missing from Cacti or differs from the one this plugin ships, so the data queries cannot list targets." +msgstr "El archivo de consulta resource/script_server/%s falta en Cacti o difiere del distribuido por el complemento; las consultas no pueden enumerar destinos." + +#: lib/HealthWarnings.php +#, php-format +msgid "Filesystem %s is mapped to device %d, which no longer exists." +msgstr "El sistema de archivos %s está asignado al dispositivo %d, que ya no existe." + +#: lib/HealthWarnings.php +#, php-format +msgid "The device of filesystem %s is polled by poller %d, but its nodes are read by poller %d, whose cache the device's data sources need." +msgstr "El dispositivo del sistema %s usa el sondeador %d, pero sus nodos los lee el sondeador %d, cuya caché necesitan las fuentes de datos del dispositivo." + +#: lib/HealthWarnings.php +#, php-format +msgid "The SSH key file %s does not exist on this server." +msgstr "El archivo de clave SSH %s no existe en este servidor." + +#: lib/HealthWarnings.php +#, php-format +msgid "The SSH key file %s can be read or written by users other than its owner (mode %s). Limit it to the poller user." +msgstr "Otros usuarios distintos del propietario pueden leer o escribir el archivo de clave SSH %s (modo %s). Limítelo al usuario del sondeador." + +#: lib/HealthWarnings.php +#, php-format +msgid "The known hosts file %s does not exist on this server, so no node can be read from it." +msgstr "El archivo de hosts conocidos %s no existe en este servidor, por lo que no se puede leer ningún nodo." + +#: lib/HealthWarnings.php +#, php-format +msgid "The SSH client %s does not exist on this server." +msgstr "El cliente SSH %s no existe en este servidor." + +#: lib/NodeInput.php +msgid "Filesystem: choose one of the registered filesystems." +msgstr "Sistema de archivos: elija uno de los sistemas registrados." + +#: lib/NodeInput.php +msgid "Name: use 1 to 64 letters, digits, dots, dashes, or underscores, starting with a letter or digit." +msgstr "Nombre: use de 1 a 64 letras, dígitos, puntos, guiones o guiones bajos, empezando por una letra o un dígito." + +#: lib/NodeInput.php +msgid "Role: choose one of the listed roles." +msgstr "Rol: elija uno de los roles enumerados." + +#: lib/NodeInput.php +msgid "Port: enter a port from 1 to 65535." +msgstr "Puerto: introduzca un puerto entre 1 y 65535." + +#: lib/NodeInput.php +msgid "Login Name: use a lower-case account name of at most 32 characters, starting with a letter or underscore." +msgstr "Nombre de inicio de sesión: use un nombre de cuenta en minúsculas de hasta 32 caracteres, empezando por una letra o un guion bajo." + +#: lib/NodeInput.php +msgid "Endpoint: enter a host name or an IP address only, without a user, port, or path." +msgstr "Punto de conexión: introduzca solo un nombre de host o dirección IP, sin usuario, puerto ni ruta." + +#: lib/NodeInput.php +msgid "Endpoint: the name does not resolve on this server." +msgstr "Punto de conexión: el nombre no se resuelve en este servidor." + +#: lib/NodeInput.php +#, php-format +msgid "Endpoint: it resolves to %s, which is not inside the networks allowed for this poller. Add the network first." +msgstr "Punto de conexión: se resuelve a %s, fuera de las redes permitidas para este sondeador. Añada primero la red." + +#: lib/NodeRole.php +msgid "Management server (MGS)" +msgstr "Servidor de gestión (MGS)" + +#: lib/NodeRole.php +msgid "Metadata server (MDS)" +msgstr "Servidor de metadatos (MDS)" + +#: lib/NodeRole.php +msgid "Object storage server (OSS)" +msgstr "Servidor de almacenamiento de objetos (OSS)" + +#: lib/NodeRole.php +msgid "Client" +msgstr "Cliente" + +#: lib/OperatorPage.php +msgid "Review the recorded observations below. Acknowledgments are personal to this session, expire when observations change, and never suppress alerts or change health." +msgstr "Revise las observaciones registradas a continuación. Los acuses de recibo son personales y exclusivos de esta sesión, caducan cuando cambian las observaciones y no suprimen alertas ni modifican el estado de salud." + +#: lib/OperatorPage.php lib/Pages.php +msgid "Parallel Filesystem Operations" +msgstr "Operaciones de sistemas de archivos paralelos" + +#: lib/OperatorPage.php +msgid "Investigation" +msgstr "Investigación" + +#: lib/OperatorPage.php +msgid "Object" +msgstr "Objeto" + +#: lib/OperatorPage.php +msgid "Observed (UTC)" +msgstr "Observado (UTC)" + +#: lib/OperatorPage.php +msgid "Unknown or stale" +msgstr "Desconocido o desactualizado" + +#: lib/OperatorPage.php +msgid "Acknowledged; health unchanged." +msgstr "Acuse de recibo registrado; estado de salud sin cambios." + +#: lib/OperatorPage.php +msgid "Acknowledge" +msgstr "Acusar recibo" + +#: lib/OperatorPage.php +msgid "No observations are available for devices you may access." +msgstr "No hay observaciones disponibles para los dispositivos a los que tiene acceso." + +#: lib/Pages.php +msgid "Parallel Filesystem Operator" +msgstr "Operador de sistemas de archivos paralelos" + +#: lib/Pages.php +msgid "Parallel Filesystem View" +msgstr "Vista de sistemas de archivos paralelos" + +#: lib/Pages.php +msgid "Parallel Filesystem Admin" +msgstr "Administración de sistemas de archivos paralelos" + +#: lib/Pages.php lib/TargetsPage.php setup.php +msgid "Parallel Filesystems" +msgstr "Sistemas de archivos paralelos" + +#: lib/Pages.php +msgid "Parallel Filesystem Registry" +msgstr "Registro de sistemas de archivos paralelos" + +#: lib/Pages.php +msgid "Parallel Filesystem Health" +msgstr "Estado de sistemas de archivos paralelos" + +#: lib/ReadError.php +msgid "The plugin settings for node access are incomplete or unusable" +msgstr "La configuración de acceso a nodos está incompleta o no se puede usar" + +#: lib/ReadError.php +msgid "The endpoint resolves outside the networks allowed for its poller" +msgstr "El punto de conexión se resuelve fuera de las redes permitidas para su sondeador" + +#: lib/ReadError.php +msgid "The endpoint name does not resolve" +msgstr "El nombre del punto de conexión no se resuelve" + +#: lib/ReadError.php +msgid "The node could not be reached" +msgstr "No se pudo alcanzar el nodo" + +#: lib/ReadError.php +msgid "The node host key is unknown or changed" +msgstr "La clave del host es desconocida o ha cambiado" + +#: lib/ReadError.php +msgid "The node refused the key" +msgstr "El nodo rechazó la clave" + +#: lib/ReadError.php +msgid "The read exceeded its time limit" +msgstr "La lectura superó el límite de tiempo" + +#: lib/ReadError.php +msgid "The response exceeded the size limit" +msgstr "La respuesta superó el límite de tamaño" + +#: lib/ReadError.php +msgid "The read command failed" +msgstr "Falló el comando de lectura" + +#: lib/ReadError.php +msgid "The node did not answer with the fixed read script" +msgstr "El nodo no respondió con el script de lectura fijo" + +#: lib/ReadError.php +msgid "The response ended before the read script finished" +msgstr "La respuesta terminó antes de finalizar el script de lectura" + +#: lib/Settings.php +msgid "Node Access" +msgstr "Acceso a nodos" + +#: lib/Settings.php +msgid "Absolute path to the ssh client on each poller that reads nodes." +msgstr "Ruta absoluta del cliente ssh en cada sondeador que lee nodos." + +#: lib/Settings.php +msgid "SSH Client" +msgstr "Cliente SSH" + +#: lib/Settings.php +msgid "Absolute path, on each poller that reads nodes, to the private key whose public half each node lists in authorized_keys with a forced command running pfs-read.sh. Readable only by the poller user. The plugin never creates, copies, or prints it." +msgstr "Ruta absoluta, en cada sondeador lector, de la clave privada cuya parte pública figura en authorized_keys de cada nodo con un comando forzado que ejecuta pfs-read.sh. Solo debe leerla el usuario del sondeador. El complemento nunca la crea, copia ni imprime." + +#: lib/Settings.php +msgid "SSH Key File" +msgstr "Archivo de clave SSH" + +#: lib/Settings.php +msgid "Absolute path to the known_hosts file holding each node host key under the node endpoint name. A node whose key is missing or changed is not read." +msgstr "Ruta absoluta de known_hosts, que contiene la clave de cada nodo bajo su nombre de punto de conexión. No se lee un nodo cuya clave falte o haya cambiado." + +#: lib/Settings.php +msgid "Known Hosts File" +msgstr "Archivo de hosts conocidos" + +#: lib/Settings.php +msgid "Connect Timeout" +msgstr "Tiempo de espera de conexión" + +#: lib/Settings.php +msgid "Seconds to wait for a node to accept the connection." +msgstr "Segundos que se espera a que un nodo acepte la conexión." + +#: lib/Settings.php +msgid "Read Timeout" +msgstr "Tiempo de espera de lectura" + +#: lib/Settings.php +msgid "Seconds one node read may take in total before it is stopped and recorded as failed." +msgstr "Segundos máximos para leer un nodo antes de detener la lectura y registrarla como fallida." + +#: lib/Settings.php +msgid "KiB one node may return. A larger answer is discarded and recorded as failed." +msgstr "KiB que puede devolver un nodo. Una respuesta mayor se descarta y se registra como fallida." + +#: lib/Settings.php +msgid "Maximum Response" +msgstr "Respuesta máxima" + +#: lib/Settings.php +msgid "Reader" +msgstr "Lector" + +#: lib/Settings.php +msgid "Reader Time Budget" +msgstr "Presupuesto de tiempo del lector" + +#: lib/Settings.php +msgid "Seconds one reader run may spend before it stops starting node reads. Keep it below the poller interval; unread nodes are read on the next run." +msgstr "Segundos disponibles para una ejecución del lector antes de dejar de iniciar lecturas. Manténgalos por debajo del intervalo de sondeo; los nodos pendientes se leen en la próxima ejecución." + +#: lib/Settings.php +msgid "Concurrent Reads" +msgstr "Lecturas simultáneas" + +#: lib/Settings.php +msgid "Node reads one reader runs at the same time." +msgstr "Lecturas de nodos que un lector ejecuta al mismo tiempo." + +#: lib/Settings.php +msgid "Uninstall" +msgstr "Desinstalar" + +#: lib/Settings.php +msgid "Keep Plugin Tables on Uninstall" +msgstr "Conservar tablas al desinstalar" + +#: lib/Settings.php +msgid "When checked, uninstalling the plugin keeps its filesystems, nodes, inventory, and cache. Clear it to have the uninstall drop them; export the registry first from the Parallel Filesystem Admin page. Storage nodes are never contacted either way." +msgstr "Si está marcado, la desinstalación conserva sistemas de archivos, nodos, inventario y caché. Desmárquelo para eliminarlos; exporte antes el registro desde Administración de sistemas de archivos paralelos. Nunca se contacta con los nodos de almacenamiento." + +#: lib/Settings.php +msgid "Delete the Devices This Plugin Created on Uninstall" +msgstr "Eliminar al desinstalar los dispositivos creados por este plugin" + +#: lib/Settings.php +msgid "When checked, uninstalling the plugin deletes the devices it created for filesystems, with their graphs and data sources, as deleting them in Cacti would. Existing devices that were mapped to a filesystem are never deleted. RRD files are removed only if Cacti's own RRD cleanup setting removes them. Cleared, the devices stay." +msgstr "Si se marca, al desinstalar se eliminan los dispositivos creados por el plugin para los sistemas de archivos, junto con sus gráficos y fuentes de datos, como al borrarlos en Cacti. Nunca se eliminan dispositivos existentes asociados a un sistema. Los archivos RRD solo se eliminan si lo dispone el ajuste de limpieza RRD de Cacti. Sin marcar, se conservan los dispositivos." + +#: lib/TargetsPage.php +msgid "No filesystem is visible to you." +msgstr "No hay sistemas de archivos visibles para usted." + +#: lib/TargetsPage.php +#, php-format +msgid "Filesystem %s" +msgstr "Sistema de archivos %s" + +#: lib/TargetsPage.php +msgid "Graphs of this filesystem" +msgstr "Gráficos de este sistema de archivos" + +#: lib/TargetsPage.php +msgid "Condition" +msgstr "Condición" + +#: lib/TargetsPage.php +msgid "Freshness" +msgstr "Actualidad" + +#: lib/TargetsPage.php +msgid "Known Values" +msgstr "Valores conocidos" + +#: lib/TargetsPage.php +msgid "Last Seen" +msgstr "Última detección" + +#: lib/TargetsPage.php +msgid "Recovery" +msgstr "Recuperación" + +#: lib/TargetsPage.php +msgid "Review" +msgstr "Revisión" + +#: lib/TargetsPage.php +msgid "Source Node" +msgstr "Nodo de origen" + +#: lib/TargetsPage.php +msgid "No targets found yet." +msgstr "Aún no se han encontrado destinos." + +#: pfs_admin.php +msgid "That record belongs to a Cacti device you do not have permission for. Nothing was changed." +msgstr "Ese registro pertenece a un dispositivo Cacti para el que no tiene permiso. No se cambió nada." + +#: pfs_admin.php +msgid "Name: another filesystem of this backend already uses this name." +msgstr "Nombre: otro sistema de archivos de este motor ya usa ese nombre." + +#: pfs_admin.php +msgid "The filesystem could not be saved." +msgstr "No se pudo guardar el sistema de archivos." + +#: pfs_admin.php +msgid "The filesystem was saved." +msgstr "Se guardó el sistema de archivos." + +#: pfs_admin.php +msgid "The filesystem, its nodes, and its inventory were deleted. Its Cacti device, data sources, and graphs were kept. No node was contacted." +msgstr "Se eliminaron el sistema de archivos, sus nodos y su inventario. Se conservaron el dispositivo Cacti, las fuentes de datos y los gráficos. No se contactó con ningún nodo." + +#: pfs_admin.php +msgid "Name: another node already uses this name." +msgstr "Nombre: otro nodo ya usa ese nombre." + +#: pfs_admin.php +msgid "The node could not be saved." +msgstr "No se pudo guardar el nodo." + +#: pfs_admin.php +msgid "The node was saved." +msgstr "Se guardó el nodo." + +#: pfs_admin.php +msgid "The node was deleted. Targets it reported keep their history." +msgstr "Se eliminó el nodo. Los destinos que notificó conservan su historial." + +#: pfs_admin.php +msgid "Enter a network as an address and prefix length, such as 10.20.0.0/16." +msgstr "Introduzca una red como dirección y longitud de prefijo, por ejemplo 10.20.0.0/16." + +#: pfs_admin.php +msgid "No device was added: the filesystem already has one, or the templates are not installed." +msgstr "No se añadió ningún dispositivo: el sistema ya tiene uno o las plantillas no están instaladas." + +#: pfs_admin.php +msgid "The device could not be mapped. It may be mapped to another filesystem." +msgstr "No se pudo asignar el dispositivo. Puede estar asignado a otro sistema de archivos." + +#: pfs_admin.php +msgid "The device was mapped and the data queries and overview graphs were added." +msgstr "Se asignó el dispositivo y se añadieron las consultas y gráficos de resumen." + +#: pfs_admin.php +msgid "Cacti did not create the device. See the Cacti log." +msgstr "Cacti no creó el dispositivo. Consulte el registro de Cacti." + +#: pfs_admin.php +msgid "The device, its data queries, and its overview graphs were created." +msgstr "Se crearon el dispositivo, sus consultas y sus gráficos de resumen." + +#: pfs_admin.php +msgid "The device is no longer mapped. It and its graphs were kept; its data queries list no targets until it is mapped again." +msgstr "Se desasignó el dispositivo. Se conservó junto con sus gráficos; sus consultas no enumeran destinos hasta volver a asignarlo." + +#: pfs_health.php +msgid "The templates and data query files were installed." +msgstr "Se instalaron las plantillas y los archivos de consulta de datos." + +#: pfs_health.php +#, php-format +msgid "The templates could not be installed: %s" +msgstr "No se pudieron instalar las plantillas: %s" + +#: pfs_operator.php +msgid "Monitoring view" +msgstr "Vista de supervisión" + +#: pfs_operator.php +msgid "Observations could not be read. Ask an administrator to check the plugin log." +msgstr "No se pudieron leer las observaciones. Pida a un administrador que revise el registro del complemento." + +#: setup.php +#, php-format +msgid "The Parallel Filesystem plugin requires PHP %s or later. This server runs PHP %s, so the plugin was not installed or enabled." +msgstr "El complemento de Sistemas de archivos paralelos requiere PHP %s o posterior. Este servidor ejecuta PHP %s, por lo que no se instaló ni activó." + +#: setup.php +msgid "The Parallel Filesystem plugin is not enabled." +msgstr "El complemento de Sistemas de archivos paralelos no está activado." + +#: setup.php +#, php-format +msgid "The Parallel Filesystem plugin requires PHP %s or later." +msgstr "El complemento de Sistemas de archivos paralelos requiere PHP %s o posterior." + +#: setup.php +msgid "Management" +msgstr "Gestión" diff --git a/locales/po/hi-IN.po b/locales/po/hi-IN.po new file mode 100644 index 0000000..2abb7bf --- /dev/null +++ b/locales/po/hi-IN.po @@ -0,0 +1,874 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: 2026 Thomas Vincent +# +msgid "" +msgstr "" +"Project-Id-Version: pfs 0.1.0\n" +"Report-Msgid-Bugs-To: https://github.com/somethingwithproof/plugin_pfs/issues\n" +"PO-Revision-Date: 2026-11-17 00:00+0000\n" +"Last-Translator: Thomas Vincent \n" +"Language-Team: Thomas Vincent \n" +"Language: hi-IN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: include/operator.php +msgid "Inspect target capacity, imbalance and freshness on Parallel Filesystems. Escalate node access, target acceptance and device mapping to an administrator." +msgstr "Parallel Filesystems पर टार्गेट क्षमता, असंतुलन और ताज़गी जाँचें। नोड पहुँच, टार्गेट स्वीकृति और डिवाइस मैपिंग के लिए प्रशासक से संपर्क करें।" + +#: lib/AccessMethod.php +msgid "SSH forced command" +msgstr "SSH बाध्य कमांड" + +#: lib/AdminPage.php +msgid "Filesystems" +msgstr "फ़ाइल सिस्टम" + +#: lib/AdminPage.php lib/OperatorPage.php +msgid "Actions" +msgstr "कार्रवाइयाँ" + +#: lib/AdminPage.php +msgid "Backend" +msgstr "बैकएंड" + +#: lib/AdminPage.php +msgid "Cacti Device" +msgstr "Cacti डिवाइस" + +#: lib/AdminPage.php +msgid "Expected Interval" +msgstr "अपेक्षित अंतराल" + +#: lib/AdminPage.php +msgid "Name" +msgstr "नाम" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Nodes" +msgstr "नोड" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Poller" +msgstr "पोलर" + +#: lib/AdminPage.php lib/OperatorPage.php +msgid "State" +msgstr "स्थिति" + +#: lib/AdminPage.php lib/TargetsPage.php +msgid "No filesystems registered yet." +msgstr "अभी कोई फ़ाइल सिस्टम पंजीकृत नहीं है।" + +#: lib/AdminPage.php +#, php-format +msgid "%d seconds" +msgstr "%d सेकंड" + +#: lib/AdminPage.php +msgid "Delete" +msgstr "मिटाएँ" + +#: lib/AdminPage.php +msgid "Access" +msgstr "पहुँच" + +#: lib/AdminPage.php +msgid "Endpoint" +msgstr "एंडपॉइंट" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Filesystem" +msgstr "फ़ाइल सिस्टम" + +#: lib/AdminPage.php +msgid "Login Name" +msgstr "लॉगिन नाम" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Role" +msgstr "भूमिका" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "No nodes registered yet." +msgstr "अभी कोई नोड पंजीकृत नहीं है।" + +#: lib/AdminPage.php +msgid "Register a filesystem first." +msgstr "पहले फ़ाइल सिस्टम पंजीकृत करें।" + +#: lib/AdminPage.php +msgid "Export" +msgstr "निर्यात" + +#: lib/AdminPage.php +msgid "Download the registry (filesystems, nodes, networks, and target review) as JSON before an uninstall that drops the plugin tables. It holds no key or credential." +msgstr "प्लगइन तालिकाएँ मिटाने वाले अनइंस्टॉल से पहले रजिस्ट्री (फ़ाइल सिस्टम, नोड, नेटवर्क और टार्गेट समीक्षा) JSON में डाउनलोड करें। इसमें कोई कुंजी या क्रेडेंशियल नहीं है।" + +#: lib/AdminPage.php +#, php-format +msgid "Filesystem: %s" +msgstr "फ़ाइल सिस्टम: %s" + +#: lib/AdminPage.php +msgid "New Filesystem" +msgstr "नया फ़ाइल सिस्टम" + +#: lib/AdminPage.php +msgid "Expected Interval (seconds)" +msgstr "अपेक्षित अंतराल (सेकंड)" + +#: lib/AdminPage.php +msgid "Enabled" +msgstr "सक्षम" + +#: lib/AdminPage.php +msgid "New Node" +msgstr "नया नोड" + +#: lib/AdminPage.php +#, php-format +msgid "Node: %s" +msgstr "नोड: %s" + +#: lib/AdminPage.php +msgid "Endpoint (host name or address)" +msgstr "एंडपॉइंट (होस्टनाम या पता)" + +#: lib/AdminPage.php +msgid "SSH Port" +msgstr "SSH पोर्ट" + +#: lib/AdminPage.php +msgid "The node must list the reader key in authorized_keys for this login with a forced command running pfs-read.sh, for example: restrict,command=\"/usr/local/libexec/pfs-read.sh\" followed by the public key. The host key must be in the known hosts file under the endpoint as written here." +msgstr "नोड में इस लॉगिन के authorized_keys में रीडर की सार्वजनिक कुंजी और pfs-read.sh चलाने वाली बाध्य कमांड होनी चाहिए, जैसे restrict,command=\"/usr/local/libexec/pfs-read.sh\" के बाद सार्वजनिक कुंजी। होस्ट कुंजी ज्ञात होस्ट फ़ाइल में यहाँ लिखे एंडपॉइंट के नाम से होनी चाहिए।" + +#: lib/AdminPage.php +#, php-format +msgid "Cacti Device for Filesystem %s" +msgstr "फ़ाइल सिस्टम %s का Cacti डिवाइस" + +#: lib/AdminPage.php +msgid "Create a new device" +msgstr "नया डिवाइस बनाएँ" + +#: lib/AdminPage.php +msgid "Device" +msgstr "डिवाइस" + +#: lib/AdminPage.php +msgid "Show What Will Be Added" +msgstr "जो जोड़ा जाएगा उसे दिखाएँ" + +#: lib/AdminPage.php +msgid "Objects to Add" +msgstr "जोड़ने वाले ऑब्जेक्ट" + +#: lib/AdminPage.php +msgid "The device keeps its own settings, poller included. Nothing on it is changed or removed." +msgstr "डिवाइस अपनी सेटिंग, पोलर सहित, रखता है। उस पर कुछ भी बदला या हटाया नहीं जाता।" + +#: lib/AdminPage.php +msgid "Per-target graphs are created on demand from the device's New Graphs page." +msgstr "हर टार्गेट के ग्राफ़ डिवाइस के New Graphs पृष्ठ से माँग पर बनाए जाते हैं।" + +#: lib/AdminPage.php +msgid "Create the Device" +msgstr "डिवाइस बनाएँ" + +#: lib/AdminPage.php +msgid "Map This Device" +msgstr "इस डिवाइस को मैप करें" + +#: lib/AdminPage.php +msgid "Allowed Networks" +msgstr "अनुमत नेटवर्क" + +#: lib/AdminPage.php +msgid "Network" +msgstr "नेटवर्क" + +#: lib/AdminPage.php +msgid "No networks allowed yet. A poller reaches no node until its networks are listed here." +msgstr "अभी कोई नेटवर्क अनुमत नहीं है। नेटवर्क यहाँ सूचीबद्ध होने तक पोलर किसी नोड तक नहीं पहुँचता।" + +#: lib/AdminPage.php +msgid "Allow" +msgstr "अनुमति दें" + +#: lib/AdminPage.php +msgid "Targets Awaiting Review" +msgstr "समीक्षा की प्रतीक्षा में टार्गेट" + +#: lib/AdminPage.php lib/TargetsPage.php +msgid "Presence" +msgstr "उपस्थिति" + +#: lib/AdminPage.php lib/TargetsPage.php +msgid "Target" +msgstr "टार्गेट" + +#: lib/AdminPage.php +msgid "Values It Adds" +msgstr "जोड़े जाने वाले मान" + +#: lib/AdminPage.php +msgid "Accept" +msgstr "स्वीकार करें" + +#: lib/AdminPage.php +msgid "Ignore" +msgstr "अनदेखा करें" + +#: lib/AdminPage.php +msgid "No targets await review." +msgstr "कोई टार्गेट समीक्षा की प्रतीक्षा में नहीं है।" + +#: lib/AdminPage.php +msgid "Add a device" +msgstr "डिवाइस जोड़ें" + +#: lib/AdminPage.php +#, php-format +msgid "(polled by poller %d, not %d)" +msgstr "(%d पोलर द्वारा, %d द्वारा नहीं)" + +#: lib/AdminPage.php +msgid "Unmap" +msgstr "मैपिंग हटाएँ" + +#: lib/AdminPage.php +msgid "Save" +msgstr "सहेजें" + +#: lib/DeviceProvisioner.php +msgid "The Parallel Filesystem templates are not installed. Reinstall them from the health page." +msgstr "Parallel Filesystem टेम्पलेट स्थापित नहीं हैं। स्वास्थ्य पृष्ठ से उन्हें फिर स्थापित करें।" + +#: lib/DeviceProvisioner.php +#, php-format +msgid "A device \"%s\" from the %s device template, polled by poller %d, with availability checks off." +msgstr "\"%s\" डिवाइस, %s डिवाइस टेम्पलेट से, पोलर %d द्वारा पोल किया जाता है और उपलब्धता जाँच बंद है।" + +#: lib/DeviceProvisioner.php +#, php-format +msgid "The data query \"%s\", listing %d targets known now. It creates no graph by itself." +msgstr "डेटा क्वेरी \"%s\", अभी ज्ञात %d टार्गेट सूचीबद्ध करती है। यह स्वयं कोई ग्राफ़ नहीं बनाती।" + +#: lib/DeviceProvisioner.php +#, php-format +msgid "The graph \"%s\"." +msgstr "ग्राफ़ \"%s\"।" + +#: lib/DeviceProvisioner.php +#, php-format +msgid "A \"%s\" data source for each of those graphs, each one script server call per poll cycle, whatever the number of targets." +msgstr "हर ग्राफ़ के लिए \"%s\" डेटा स्रोत, प्रत्येक पोल चक्र में हर स्रोत की एक स्क्रिप्ट सर्वर कॉल, चाहे टार्गेट कितने भी हों।" + +#: lib/DeviceProvisioner.php +#, php-format +msgid "Created by the Parallel Filesystem plugin for filesystem %s. Its values come from the plugin cache; the host name is a reserved name that is never contacted." +msgstr "फ़ाइल सिस्टम %s के लिए Parallel Filesystem प्लगइन ने बनाया। मान प्लगइन कैश से आते हैं; होस्टनाम आरक्षित है और उससे कभी संपर्क नहीं होता।" + +#: lib/FilesystemInput.php +msgid "Backend: choose one of the listed backends." +msgstr "बैकएंड: सूचीबद्ध बैकएंड में से एक चुनें।" + +#: lib/FilesystemInput.php +msgid "Name: use the filesystem name the nodes print, such as the Lustre fsname of at most 8 letters, digits, dashes, or underscores." +msgstr "नाम: नोड द्वारा दिखाया फ़ाइल सिस्टम नाम दें, जैसे अधिकतम 8 अक्षर, अंक, डैश या अंडरस्कोर वाला Lustre fsname।" + +#: lib/FilesystemInput.php lib/NodeInput.php +msgid "Poller: choose one of the listed pollers." +msgstr "पोलर: सूचीबद्ध पोलर में से एक चुनें।" + +#: lib/FilesystemInput.php +#, php-format +msgid "Expected Interval: enter whole seconds from %d to %d." +msgstr "अपेक्षित अंतराल: %d से %d तक पूरे सेकंड दर्ज करें।" + +#: lib/Format.php lib/OperatorPage.php +msgid "Never" +msgstr "कभी नहीं" + +#: lib/Format.php +#, php-format +msgid "%d seconds ago" +msgstr "%d सेकंड पहले" + +#: lib/Format.php +#, php-format +msgid "%d minutes ago" +msgstr "%d मिनट पहले" + +#: lib/Format.php +#, php-format +msgid "%d hours ago" +msgstr "%d घंटे पहले" + +#: lib/Format.php +#, php-format +msgid "%d days ago" +msgstr "%d दिन पहले" + +#: lib/Format.php +#, php-format +msgid "%d B" +msgstr "%d B" + +#: lib/Format.php +#, php-format +msgid "%s KiB" +msgstr "%s KiB" + +#: lib/Format.php +#, php-format +msgid "%s MiB" +msgstr "%s MiB" + +#: lib/GraphLinks.php +#, php-format +msgid "Parallel Filesystem view of %s" +msgstr "%s का Parallel Filesystem दृश्य" + +#: lib/HealthPage.php +msgid "Parallel Filesystem Warnings" +msgstr "Parallel Filesystem चेतावनियाँ" + +#: lib/HealthPage.php +msgid "No warnings." +msgstr "कोई चेतावनी नहीं।" + +#: lib/HealthPage.php +msgid "Install the Templates Again" +msgstr "टेम्पलेट फिर स्थापित करें" + +#: lib/HealthPage.php +msgid "Readers" +msgstr "रीडर" + +#: lib/HealthPage.php +msgid "Failed" +msgstr "विफल" + +#: lib/HealthPage.php +msgid "Last Completed Run" +msgstr "अंतिम पूर्ण रन" + +#: lib/HealthPage.php +msgid "Last Run" +msgstr "अंतिम रन" + +#: lib/HealthPage.php +msgid "Not Reached" +msgstr "संपर्क नहीं हुआ" + +#: lib/HealthPage.php +msgid "Read" +msgstr "पढ़ा गया" + +#: lib/HealthPage.php +msgid "No reader has run yet." +msgstr "अभी कोई रीडर नहीं चला है।" + +#: lib/HealthPage.php +msgid "Duration" +msgstr "अवधि" + +#: lib/HealthPage.php +msgid "Failure" +msgstr "विफलता" + +#: lib/HealthPage.php +msgid "Last Read" +msgstr "अंतिम पठन" + +#: lib/HealthPage.php +msgid "Last Success" +msgstr "अंतिम सफलता" + +#: lib/HealthPage.php +msgid "Node" +msgstr "नोड" + +#: lib/HealthPage.php +msgid "Reported Version" +msgstr "रिपोर्ट किया संस्करण" + +#: lib/HealthPage.php +msgid "Response Size" +msgstr "उत्तर का आकार" + +#: lib/HealthPage.php +msgid "disabled" +msgstr "अक्षम" + +#: lib/HealthPage.php +#, php-format +msgid "%s s" +msgstr "%s सेकंड" + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the node answered without the fixed read script framing. Its key may not be limited to a forced command running pfs-read.sh." +msgstr "%s: नोड ने निश्चित रीड स्क्रिप्ट फ़्रेमिंग के बिना उत्तर दिया। शायद उसकी कुंजी pfs-read.sh चलाने वाली बाध्य कमांड तक सीमित नहीं है।" + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the node host key is not in the known hosts file, or it changed. Check the key before adding it." +msgstr "%s: नोड की होस्ट कुंजी ज्ञात होस्ट फ़ाइल में नहीं है या बदल गई है। जोड़ने से पहले कुंजी जाँचें।" + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the endpoint resolves outside the networks allowed for poller %d, so it is not read." +msgstr "%s: एंडपॉइंट पोलर %d के अनुमत नेटवर्क से बाहर रिज़ॉल्व होता है, इसलिए पढ़ा नहीं जाता।" + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the read script printed %d parameters the plugin does not read, so it is not the shipped pfs-read.sh. The node may be exposing more than the plugin needs." +msgstr "%s: रीड स्क्रिप्ट ने %d ऐसे पैरामीटर दिए जिन्हें प्लगइन नहीं पढ़ता, इसलिए यह वितरित pfs-read.sh नहीं है। नोड आवश्यकता से अधिक जानकारी उजागर कर सकता है।" + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: %d target names in the node output did not match the expected pattern or filesystem and were ignored." +msgstr "%s: नोड आउटपुट के %d टार्गेट नाम अपेक्षित पैटर्न या फ़ाइल सिस्टम से मेल नहीं खाए और अनदेखे किए गए।" + +#: lib/HealthWarnings.php +#, php-format +msgid "The reader on poller %d has not completed a run in the last %d seconds. Values from its nodes are getting stale." +msgstr "पोलर %d का रीडर पिछले %d सेकंड में कोई रन पूरा नहीं कर सका। उसके नोड के मान पुराने हो रहे हैं।" + +#: lib/HealthWarnings.php +#, php-format +msgid "Installing the Parallel Filesystem templates failed: %s" +msgstr "Parallel Filesystem टेम्पलेट स्थापित करना विफल हुआ: %s" + +#: lib/HealthWarnings.php +msgid "The Parallel Filesystem templates are not installed, so no device can be added." +msgstr "Parallel Filesystem टेम्पलेट स्थापित नहीं हैं, इसलिए कोई डिवाइस नहीं जोड़ा जा सकता।" + +#: lib/HealthWarnings.php +#, php-format +msgid "The data query file resource/script_server/%s is missing from Cacti or differs from the one this plugin ships, so the data queries cannot list targets." +msgstr "डेटा क्वेरी फ़ाइल resource/script_server/%s Cacti में गायब है या प्लगइन की फ़ाइल से भिन्न है, इसलिए क्वेरी टार्गेट सूचीबद्ध नहीं कर सकती।" + +#: lib/HealthWarnings.php +#, php-format +msgid "Filesystem %s is mapped to device %d, which no longer exists." +msgstr "फ़ाइल सिस्टम %s ऐसे डिवाइस %d से मैप है जो अब मौजूद नहीं है।" + +#: lib/HealthWarnings.php +#, php-format +msgid "The device of filesystem %s is polled by poller %d, but its nodes are read by poller %d, whose cache the device's data sources need." +msgstr "फ़ाइल सिस्टम %s का डिवाइस पोलर %d से पोल होता है, पर नोड पोलर %d द्वारा पढ़े जाते हैं, जिसके कैश की डिवाइस डेटा स्रोतों को आवश्यकता है।" + +#: lib/HealthWarnings.php +#, php-format +msgid "The SSH key file %s does not exist on this server." +msgstr "इस सर्वर पर SSH कुंजी फ़ाइल %s मौजूद नहीं है।" + +#: lib/HealthWarnings.php +#, php-format +msgid "The SSH key file %s can be read or written by users other than its owner (mode %s). Limit it to the poller user." +msgstr "SSH कुंजी फ़ाइल %s को मालिक के अलावा अन्य उपयोगकर्ता पढ़ या लिख सकते हैं (मोड %s)। इसे केवल पोलर उपयोगकर्ता तक सीमित करें।" + +#: lib/HealthWarnings.php +#, php-format +msgid "The known hosts file %s does not exist on this server, so no node can be read from it." +msgstr "इस सर्वर पर ज्ञात होस्ट फ़ाइल %s मौजूद नहीं है, इसलिए कोई नोड नहीं पढ़ा जा सकता।" + +#: lib/HealthWarnings.php +#, php-format +msgid "The SSH client %s does not exist on this server." +msgstr "इस सर्वर पर SSH क्लाइंट %s मौजूद नहीं है।" + +#: lib/NodeInput.php +msgid "Filesystem: choose one of the registered filesystems." +msgstr "फ़ाइल सिस्टम: पंजीकृत फ़ाइल सिस्टम में से एक चुनें।" + +#: lib/NodeInput.php +msgid "Name: use 1 to 64 letters, digits, dots, dashes, or underscores, starting with a letter or digit." +msgstr "नाम: 1 से 64 अक्षर, अंक, बिंदु, डैश या अंडरस्कोर दें, जिसकी शुरुआत अक्षर या अंक से हो।" + +#: lib/NodeInput.php +msgid "Role: choose one of the listed roles." +msgstr "भूमिका: सूचीबद्ध भूमिकाओं में से एक चुनें।" + +#: lib/NodeInput.php +msgid "Port: enter a port from 1 to 65535." +msgstr "पोर्ट: 1 से 65535 तक पोर्ट दर्ज करें।" + +#: lib/NodeInput.php +msgid "Login Name: use a lower-case account name of at most 32 characters, starting with a letter or underscore." +msgstr "लॉगिन नाम: अधिकतम 32 वर्णों का छोटे अक्षरों वाला खाता नाम दें, जिसकी शुरुआत अक्षर या अंडरस्कोर से हो।" + +#: lib/NodeInput.php +msgid "Endpoint: enter a host name or an IP address only, without a user, port, or path." +msgstr "एंडपॉइंट: केवल होस्टनाम या IP पता दें, उपयोगकर्ता, पोर्ट या पथ नहीं।" + +#: lib/NodeInput.php +msgid "Endpoint: the name does not resolve on this server." +msgstr "एंडपॉइंट: इस सर्वर पर नाम रिज़ॉल्व नहीं होता।" + +#: lib/NodeInput.php +#, php-format +msgid "Endpoint: it resolves to %s, which is not inside the networks allowed for this poller. Add the network first." +msgstr "एंडपॉइंट: यह %s पर रिज़ॉल्व होता है, जो इस पोलर के अनुमत नेटवर्क में नहीं है। पहले नेटवर्क जोड़ें।" + +#: lib/NodeRole.php +msgid "Management server (MGS)" +msgstr "प्रबंधन सर्वर (MGS)" + +#: lib/NodeRole.php +msgid "Metadata server (MDS)" +msgstr "मेटाडेटा सर्वर (MDS)" + +#: lib/NodeRole.php +msgid "Object storage server (OSS)" +msgstr "ऑब्जेक्ट स्टोरेज सर्वर (OSS)" + +#: lib/NodeRole.php +msgid "Client" +msgstr "क्लाइंट" + +#: lib/OperatorPage.php +msgid "Review the recorded observations below. Acknowledgments are personal to this session, expire when observations change, and never suppress alerts or change health." +msgstr "नीचे दर्ज अवलोकन देखें। स्वीकृतियाँ केवल आपके इस सत्र के लिए हैं, अवलोकन बदलने पर समाप्त होती हैं और अलर्ट दबाती या स्वास्थ्य बदलती नहीं हैं।" + +#: lib/OperatorPage.php lib/Pages.php +msgid "Parallel Filesystem Operations" +msgstr "Parallel Filesystem संचालन" + +#: lib/OperatorPage.php +msgid "Investigation" +msgstr "जाँच" + +#: lib/OperatorPage.php +msgid "Object" +msgstr "वस्तु" + +#: lib/OperatorPage.php +msgid "Observed (UTC)" +msgstr "अवलोकन समय (UTC)" + +#: lib/OperatorPage.php +msgid "Unknown or stale" +msgstr "अज्ञात या पुराना" + +#: lib/OperatorPage.php +msgid "Acknowledged; health unchanged." +msgstr "स्वीकार किया गया; स्वास्थ्य अपरिवर्तित है।" + +#: lib/OperatorPage.php +msgid "Acknowledge" +msgstr "स्वीकार करें" + +#: lib/OperatorPage.php +msgid "No observations are available for devices you may access." +msgstr "आपकी पहुँच वाले डिवाइसों के लिए कोई अवलोकन उपलब्ध नहीं है।" + +#: lib/Pages.php +msgid "Parallel Filesystem Operator" +msgstr "Parallel Filesystem ऑपरेटर" + +#: lib/Pages.php +msgid "Parallel Filesystem View" +msgstr "Parallel Filesystem दृश्य" + +#: lib/Pages.php +msgid "Parallel Filesystem Admin" +msgstr "Parallel Filesystem प्रशासन" + +#: lib/Pages.php lib/TargetsPage.php setup.php +msgid "Parallel Filesystems" +msgstr "समानांतर फ़ाइल सिस्टम" + +#: lib/Pages.php +msgid "Parallel Filesystem Registry" +msgstr "Parallel Filesystem रजिस्ट्री" + +#: lib/Pages.php +msgid "Parallel Filesystem Health" +msgstr "Parallel Filesystem स्वास्थ्य" + +#: lib/ReadError.php +msgid "The plugin settings for node access are incomplete or unusable" +msgstr "नोड पहुँच की प्लगइन सेटिंग अधूरी या अनुपयोगी है" + +#: lib/ReadError.php +msgid "The endpoint resolves outside the networks allowed for its poller" +msgstr "एंडपॉइंट अपने पोलर के अनुमत नेटवर्क से बाहर रिज़ॉल्व होता है" + +#: lib/ReadError.php +msgid "The endpoint name does not resolve" +msgstr "एंडपॉइंट नाम रिज़ॉल्व नहीं होता" + +#: lib/ReadError.php +msgid "The node could not be reached" +msgstr "नोड तक नहीं पहुँचा जा सका" + +#: lib/ReadError.php +msgid "The node host key is unknown or changed" +msgstr "नोड की होस्ट कुंजी अज्ञात है या बदल गई है" + +#: lib/ReadError.php +msgid "The node refused the key" +msgstr "नोड ने कुंजी अस्वीकार की" + +#: lib/ReadError.php +msgid "The read exceeded its time limit" +msgstr "पठन समय सीमा से अधिक चला" + +#: lib/ReadError.php +msgid "The response exceeded the size limit" +msgstr "उत्तर आकार सीमा से अधिक है" + +#: lib/ReadError.php +msgid "The read command failed" +msgstr "रीड कमांड विफल हुई" + +#: lib/ReadError.php +msgid "The node did not answer with the fixed read script" +msgstr "नोड ने निश्चित रीड स्क्रिप्ट से उत्तर नहीं दिया" + +#: lib/ReadError.php +msgid "The response ended before the read script finished" +msgstr "रीड स्क्रिप्ट समाप्त होने से पहले उत्तर समाप्त हो गया" + +#: lib/Settings.php +msgid "Node Access" +msgstr "नोड पहुँच" + +#: lib/Settings.php +msgid "Absolute path to the ssh client on each poller that reads nodes." +msgstr "नोड पढ़ने वाले हर पोलर पर ssh क्लाइंट का पूर्ण पथ।" + +#: lib/Settings.php +msgid "SSH Client" +msgstr "SSH क्लाइंट" + +#: lib/Settings.php +msgid "Absolute path, on each poller that reads nodes, to the private key whose public half each node lists in authorized_keys with a forced command running pfs-read.sh. Readable only by the poller user. The plugin never creates, copies, or prints it." +msgstr "नोड पढ़ने वाले हर पोलर पर निजी कुंजी का पूर्ण पथ। उसकी सार्वजनिक कुंजी हर नोड के authorized_keys में pfs-read.sh चलाने वाली बाध्य कमांड के साथ होनी चाहिए। केवल पोलर उपयोगकर्ता पढ़ सके। प्लगइन इसे बनाता, कॉपी करता या छापता नहीं है।" + +#: lib/Settings.php +msgid "SSH Key File" +msgstr "SSH कुंजी फ़ाइल" + +#: lib/Settings.php +msgid "Absolute path to the known_hosts file holding each node host key under the node endpoint name. A node whose key is missing or changed is not read." +msgstr "known_hosts फ़ाइल का पूर्ण पथ, जिसमें हर नोड की होस्ट कुंजी उसके एंडपॉइंट नाम से हो। कुंजी गायब या बदली होने पर नोड नहीं पढ़ा जाता।" + +#: lib/Settings.php +msgid "Known Hosts File" +msgstr "ज्ञात होस्ट फ़ाइल" + +#: lib/Settings.php +msgid "Connect Timeout" +msgstr "कनेक्शन समय सीमा" + +#: lib/Settings.php +msgid "Seconds to wait for a node to accept the connection." +msgstr "नोड द्वारा कनेक्शन स्वीकार करने की प्रतीक्षा के सेकंड।" + +#: lib/Settings.php +msgid "Read Timeout" +msgstr "पठन समय सीमा" + +#: lib/Settings.php +msgid "Seconds one node read may take in total before it is stopped and recorded as failed." +msgstr "एक नोड पठन के कुल सेकंड, जिनके बाद उसे रोककर विफल दर्ज किया जाता है।" + +#: lib/Settings.php +msgid "KiB one node may return. A larger answer is discarded and recorded as failed." +msgstr "एक नोड के उत्तर की KiB सीमा। बड़ा उत्तर त्यागकर विफल दर्ज किया जाता है।" + +#: lib/Settings.php +msgid "Maximum Response" +msgstr "अधिकतम उत्तर" + +#: lib/Settings.php +msgid "Reader" +msgstr "रीडर" + +#: lib/Settings.php +msgid "Reader Time Budget" +msgstr "रीडर समय बजट" + +#: lib/Settings.php +msgid "Seconds one reader run may spend before it stops starting node reads. Keep it below the poller interval; unread nodes are read on the next run." +msgstr "एक रीडर रन के अनुमत सेकंड, जिसके बाद वह नए नोड पढ़ना शुरू नहीं करता। इसे पोलर अंतराल से कम रखें; बचे नोड अगले रन में पढ़े जाते हैं।" + +#: lib/Settings.php +msgid "Concurrent Reads" +msgstr "समवर्ती पठन" + +#: lib/Settings.php +msgid "Node reads one reader runs at the same time." +msgstr "एक रीडर द्वारा एक साथ किए जाने वाले नोड पठन।" + +#: lib/Settings.php +msgid "Uninstall" +msgstr "अनइंस्टॉल" + +#: lib/Settings.php +msgid "Keep Plugin Tables on Uninstall" +msgstr "अनइंस्टॉल पर प्लगइन तालिकाएँ रखें" + +#: lib/Settings.php +msgid "When checked, uninstalling the plugin keeps its filesystems, nodes, inventory, and cache. Clear it to have the uninstall drop them; export the registry first from the Parallel Filesystem Admin page. Storage nodes are never contacted either way." +msgstr "चयनित होने पर अनइंस्टॉल फ़ाइल सिस्टम, नोड, सूची और कैश रखता है। मिटाने के लिए चयन हटाएँ; पहले Parallel Filesystem Admin पृष्ठ से रजिस्ट्री निर्यात करें। दोनों स्थितियों में स्टोरेज नोड से संपर्क नहीं होता।" + +#: lib/Settings.php +msgid "Delete the Devices This Plugin Created on Uninstall" +msgstr "अनइंस्टॉल पर इस प्लगइन के बनाए डिवाइस हटाएँ" + +#: lib/Settings.php +msgid "When checked, uninstalling the plugin deletes the devices it created for filesystems, with their graphs and data sources, as deleting them in Cacti would. Existing devices that were mapped to a filesystem are never deleted. RRD files are removed only if Cacti's own RRD cleanup setting removes them. Cleared, the devices stay." +msgstr "चुने जाने पर अनइंस्टॉल फ़ाइल सिस्टम के लिए प्लगइन द्वारा बनाए डिवाइस, उनके ग्राफ़ और डेटा स्रोत Cacti की डिवाइस हटाने की प्रक्रिया की तरह हटाता है। फ़ाइल सिस्टम से मैप किए मौजूदा डिवाइस कभी नहीं हटते। RRD फ़ाइलें केवल Cacti की अपनी RRD सफ़ाई सेटिंग के अनुसार हटती हैं। चयन न हो तो डिवाइस रहते हैं।" + +#: lib/TargetsPage.php +msgid "No filesystem is visible to you." +msgstr "आपको कोई फ़ाइल सिस्टम दिखाई नहीं देता।" + +#: lib/TargetsPage.php +#, php-format +msgid "Filesystem %s" +msgstr "फ़ाइल सिस्टम %s" + +#: lib/TargetsPage.php +msgid "Graphs of this filesystem" +msgstr "इस फ़ाइल सिस्टम के ग्राफ़" + +#: lib/TargetsPage.php +msgid "Condition" +msgstr "अवस्था" + +#: lib/TargetsPage.php +msgid "Freshness" +msgstr "ताज़गी" + +#: lib/TargetsPage.php +msgid "Known Values" +msgstr "ज्ञात मान" + +#: lib/TargetsPage.php +msgid "Last Seen" +msgstr "अंतिम बार देखा गया" + +#: lib/TargetsPage.php +msgid "Recovery" +msgstr "पुनर्प्राप्ति" + +#: lib/TargetsPage.php +msgid "Review" +msgstr "समीक्षा" + +#: lib/TargetsPage.php +msgid "Source Node" +msgstr "स्रोत नोड" + +#: lib/TargetsPage.php +msgid "No targets found yet." +msgstr "अभी कोई टार्गेट नहीं मिला।" + +#: pfs_admin.php +msgid "That record belongs to a Cacti device you do not have permission for. Nothing was changed." +msgstr "वह रिकॉर्ड ऐसे Cacti डिवाइस का है जिसकी आपको अनुमति नहीं है। कुछ नहीं बदला गया।" + +#: pfs_admin.php +msgid "Name: another filesystem of this backend already uses this name." +msgstr "नाम: इस बैकएंड का दूसरा फ़ाइल सिस्टम यह नाम पहले से उपयोग करता है।" + +#: pfs_admin.php +msgid "The filesystem could not be saved." +msgstr "फ़ाइल सिस्टम सहेजा नहीं जा सका।" + +#: pfs_admin.php +msgid "The filesystem was saved." +msgstr "फ़ाइल सिस्टम सहेजा गया।" + +#: pfs_admin.php +msgid "The filesystem, its nodes, and its inventory were deleted. Its Cacti device, data sources, and graphs were kept. No node was contacted." +msgstr "फ़ाइल सिस्टम, उसके नोड और सूची मिटा दिए गए। Cacti डिवाइस, डेटा स्रोत और ग्राफ़ रखे गए। किसी नोड से संपर्क नहीं हुआ।" + +#: pfs_admin.php +msgid "Name: another node already uses this name." +msgstr "नाम: दूसरा नोड यह नाम पहले से उपयोग करता है।" + +#: pfs_admin.php +msgid "The node could not be saved." +msgstr "नोड सहेजा नहीं जा सका।" + +#: pfs_admin.php +msgid "The node was saved." +msgstr "नोड सहेजा गया।" + +#: pfs_admin.php +msgid "The node was deleted. Targets it reported keep their history." +msgstr "नोड मिटा दिया गया। उसके रिपोर्ट किए टार्गेट अपना इतिहास रखते हैं।" + +#: pfs_admin.php +msgid "Enter a network as an address and prefix length, such as 10.20.0.0/16." +msgstr "नेटवर्क का पता और उपसर्ग लंबाई दें, जैसे 10.20.0.0/16।" + +#: pfs_admin.php +msgid "No device was added: the filesystem already has one, or the templates are not installed." +msgstr "डिवाइस नहीं जोड़ा गया: फ़ाइल सिस्टम का डिवाइस पहले से है या टेम्पलेट स्थापित नहीं हैं।" + +#: pfs_admin.php +msgid "The device could not be mapped. It may be mapped to another filesystem." +msgstr "डिवाइस मैप नहीं हो सका। शायद वह दूसरे फ़ाइल सिस्टम से मैप है।" + +#: pfs_admin.php +msgid "The device was mapped and the data queries and overview graphs were added." +msgstr "डिवाइस मैप हुआ और डेटा क्वेरी तथा अवलोकन ग्राफ़ जोड़े गए।" + +#: pfs_admin.php +msgid "Cacti did not create the device. See the Cacti log." +msgstr "Cacti ने डिवाइस नहीं बनाया। Cacti लॉग देखें।" + +#: pfs_admin.php +msgid "The device, its data queries, and its overview graphs were created." +msgstr "डिवाइस, उसकी डेटा क्वेरी और अवलोकन ग्राफ़ बनाए गए।" + +#: pfs_admin.php +msgid "The device is no longer mapped. It and its graphs were kept; its data queries list no targets until it is mapped again." +msgstr "डिवाइस की मैपिंग हटा दी गई। वह और उसके ग्राफ़ रखे गए; दोबारा मैप होने तक क्वेरी कोई टार्गेट नहीं दिखाती।" + +#: pfs_health.php +msgid "The templates and data query files were installed." +msgstr "टेम्पलेट और डेटा क्वेरी फ़ाइलें स्थापित हुईं।" + +#: pfs_health.php +#, php-format +msgid "The templates could not be installed: %s" +msgstr "टेम्पलेट स्थापित नहीं हो सके: %s" + +#: pfs_operator.php +msgid "Monitoring view" +msgstr "निगरानी दृश्य" + +#: pfs_operator.php +msgid "Observations could not be read. Ask an administrator to check the plugin log." +msgstr "अवलोकन पढ़े नहीं जा सके। प्रशासक से प्लगइन लॉग जाँचने को कहें।" + +#: setup.php +#, php-format +msgid "The Parallel Filesystem plugin requires PHP %s or later. This server runs PHP %s, so the plugin was not installed or enabled." +msgstr "Parallel Filesystem प्लगइन के लिए PHP %s या बाद का संस्करण चाहिए। यह सर्वर PHP %s चलाता है, इसलिए प्लगइन स्थापित या सक्षम नहीं हुआ।" + +#: setup.php +msgid "The Parallel Filesystem plugin is not enabled." +msgstr "Parallel Filesystem प्लगइन सक्षम नहीं है।" + +#: setup.php +#, php-format +msgid "The Parallel Filesystem plugin requires PHP %s or later." +msgstr "Parallel Filesystem प्लगइन के लिए PHP %s या बाद का संस्करण चाहिए।" + +#: setup.php +msgid "Management" +msgstr "प्रबंधन" diff --git a/locales/po/zh-CN.po b/locales/po/zh-CN.po new file mode 100644 index 0000000..bdec2a8 --- /dev/null +++ b/locales/po/zh-CN.po @@ -0,0 +1,874 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: 2026 Thomas Vincent +# +msgid "" +msgstr "" +"Project-Id-Version: pfs 0.1.0\n" +"Report-Msgid-Bugs-To: https://github.com/somethingwithproof/plugin_pfs/issues\n" +"PO-Revision-Date: 2026-11-17 00:00+0000\n" +"Last-Translator: Thomas Vincent \n" +"Language-Team: Thomas Vincent \n" +"Language: zh-CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: include/operator.php +msgid "Inspect target capacity, imbalance and freshness on Parallel Filesystems. Escalate node access, target acceptance and device mapping to an administrator." +msgstr "在并行文件系统页面检查目标容量、不均衡和数据时效。节点访问、目标接纳和设备映射请交由管理员处理。" + +#: lib/AccessMethod.php +msgid "SSH forced command" +msgstr "SSH 强制命令" + +#: lib/AdminPage.php +msgid "Filesystems" +msgstr "文件系统" + +#: lib/AdminPage.php lib/OperatorPage.php +msgid "Actions" +msgstr "操作" + +#: lib/AdminPage.php +msgid "Backend" +msgstr "后端" + +#: lib/AdminPage.php +msgid "Cacti Device" +msgstr "Cacti 设备" + +#: lib/AdminPage.php +msgid "Expected Interval" +msgstr "预期间隔" + +#: lib/AdminPage.php +msgid "Name" +msgstr "名称" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Nodes" +msgstr "节点" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Poller" +msgstr "轮询器" + +#: lib/AdminPage.php lib/OperatorPage.php +msgid "State" +msgstr "状态" + +#: lib/AdminPage.php lib/TargetsPage.php +msgid "No filesystems registered yet." +msgstr "尚未注册文件系统。" + +#: lib/AdminPage.php +#, php-format +msgid "%d seconds" +msgstr "%d 秒" + +#: lib/AdminPage.php +msgid "Delete" +msgstr "删除" + +#: lib/AdminPage.php +msgid "Access" +msgstr "访问" + +#: lib/AdminPage.php +msgid "Endpoint" +msgstr "端点" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Filesystem" +msgstr "文件系统" + +#: lib/AdminPage.php +msgid "Login Name" +msgstr "登录名" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "Role" +msgstr "角色" + +#: lib/AdminPage.php lib/HealthPage.php +msgid "No nodes registered yet." +msgstr "尚未注册节点。" + +#: lib/AdminPage.php +msgid "Register a filesystem first." +msgstr "请先注册文件系统。" + +#: lib/AdminPage.php +msgid "Export" +msgstr "导出" + +#: lib/AdminPage.php +msgid "Download the registry (filesystems, nodes, networks, and target review) as JSON before an uninstall that drops the plugin tables. It holds no key or credential." +msgstr "在卸载并删除插件表之前,请将注册表(文件系统、节点、网络和目标审核)下载为 JSON。其中不含密钥或凭据。" + +#: lib/AdminPage.php +#, php-format +msgid "Filesystem: %s" +msgstr "文件系统:%s" + +#: lib/AdminPage.php +msgid "New Filesystem" +msgstr "新建文件系统" + +#: lib/AdminPage.php +msgid "Expected Interval (seconds)" +msgstr "预期间隔(秒)" + +#: lib/AdminPage.php +msgid "Enabled" +msgstr "已启用" + +#: lib/AdminPage.php +msgid "New Node" +msgstr "新建节点" + +#: lib/AdminPage.php +#, php-format +msgid "Node: %s" +msgstr "节点:%s" + +#: lib/AdminPage.php +msgid "Endpoint (host name or address)" +msgstr "端点(主机名或地址)" + +#: lib/AdminPage.php +msgid "SSH Port" +msgstr "SSH 端口" + +#: lib/AdminPage.php +msgid "The node must list the reader key in authorized_keys for this login with a forced command running pfs-read.sh, for example: restrict,command=\"/usr/local/libexec/pfs-read.sh\" followed by the public key. The host key must be in the known hosts file under the endpoint as written here." +msgstr "节点必须为此登录名在 authorized_keys 中列出读取器公钥,并通过强制命令运行 pfs-read.sh,例如 restrict,command=\"/usr/local/libexec/pfs-read.sh\" 后接公钥。主机密钥必须以此处填写的端点名称保存在已知主机文件中。" + +#: lib/AdminPage.php +#, php-format +msgid "Cacti Device for Filesystem %s" +msgstr "文件系统 %s 的 Cacti 设备" + +#: lib/AdminPage.php +msgid "Create a new device" +msgstr "创建新设备" + +#: lib/AdminPage.php +msgid "Device" +msgstr "设备" + +#: lib/AdminPage.php +msgid "Show What Will Be Added" +msgstr "显示将添加的内容" + +#: lib/AdminPage.php +msgid "Objects to Add" +msgstr "待添加的对象" + +#: lib/AdminPage.php +msgid "The device keeps its own settings, poller included. Nothing on it is changed or removed." +msgstr "设备保留自身设置,包括轮询器。不会更改或移除设备上的任何内容。" + +#: lib/AdminPage.php +msgid "Per-target graphs are created on demand from the device's New Graphs page." +msgstr "每个目标的图表可从设备的新建图表页面按需创建。" + +#: lib/AdminPage.php +msgid "Create the Device" +msgstr "创建设备" + +#: lib/AdminPage.php +msgid "Map This Device" +msgstr "映射此设备" + +#: lib/AdminPage.php +msgid "Allowed Networks" +msgstr "允许的网络" + +#: lib/AdminPage.php +msgid "Network" +msgstr "网络" + +#: lib/AdminPage.php +msgid "No networks allowed yet. A poller reaches no node until its networks are listed here." +msgstr "尚未允许任何网络。只有在此列出网络后,轮询器才能访问节点。" + +#: lib/AdminPage.php +msgid "Allow" +msgstr "允许" + +#: lib/AdminPage.php +msgid "Targets Awaiting Review" +msgstr "待审核的目标" + +#: lib/AdminPage.php lib/TargetsPage.php +msgid "Presence" +msgstr "存在状态" + +#: lib/AdminPage.php lib/TargetsPage.php +msgid "Target" +msgstr "目标" + +#: lib/AdminPage.php +msgid "Values It Adds" +msgstr "新增的值" + +#: lib/AdminPage.php +msgid "Accept" +msgstr "接纳" + +#: lib/AdminPage.php +msgid "Ignore" +msgstr "忽略" + +#: lib/AdminPage.php +msgid "No targets await review." +msgstr "没有待审核的目标。" + +#: lib/AdminPage.php +msgid "Add a device" +msgstr "添加设备" + +#: lib/AdminPage.php +#, php-format +msgid "(polled by poller %d, not %d)" +msgstr "(由轮询器 %d 轮询,而非 %d)" + +#: lib/AdminPage.php +msgid "Unmap" +msgstr "取消映射" + +#: lib/AdminPage.php +msgid "Save" +msgstr "保存" + +#: lib/DeviceProvisioner.php +msgid "The Parallel Filesystem templates are not installed. Reinstall them from the health page." +msgstr "尚未安装并行文件系统模板。请从健康页面重新安装。" + +#: lib/DeviceProvisioner.php +#, php-format +msgid "A device \"%s\" from the %s device template, polled by poller %d, with availability checks off." +msgstr "名为“%s”的设备,基于 %s 设备模板,由轮询器 %d 轮询,可用性检查关闭。" + +#: lib/DeviceProvisioner.php +#, php-format +msgid "The data query \"%s\", listing %d targets known now. It creates no graph by itself." +msgstr "数据查询“%s”,列出当前已知的 %d 个目标。它本身不会创建图表。" + +#: lib/DeviceProvisioner.php +#, php-format +msgid "The graph \"%s\"." +msgstr "图表“%s”。" + +#: lib/DeviceProvisioner.php +#, php-format +msgid "A \"%s\" data source for each of those graphs, each one script server call per poll cycle, whatever the number of targets." +msgstr "每个图表配有一个“%s”数据源,无论目标数量多少,每个数据源每次轮询周期调用脚本服务器一次。" + +#: lib/DeviceProvisioner.php +#, php-format +msgid "Created by the Parallel Filesystem plugin for filesystem %s. Its values come from the plugin cache; the host name is a reserved name that is never contacted." +msgstr "由并行文件系统插件为文件系统 %s 创建。其值来自插件缓存;主机名是保留名称,永远不会连接。" + +#: lib/FilesystemInput.php +msgid "Backend: choose one of the listed backends." +msgstr "后端:请选择列出的后端。" + +#: lib/FilesystemInput.php +msgid "Name: use the filesystem name the nodes print, such as the Lustre fsname of at most 8 letters, digits, dashes, or underscores." +msgstr "名称:请使用节点输出的文件系统名称,例如最多 8 个字母、数字、连字符或下划线组成的 Lustre fsname。" + +#: lib/FilesystemInput.php lib/NodeInput.php +msgid "Poller: choose one of the listed pollers." +msgstr "轮询器:请选择列出的轮询器。" + +#: lib/FilesystemInput.php +#, php-format +msgid "Expected Interval: enter whole seconds from %d to %d." +msgstr "预期间隔:请输入 %d 至 %d 之间的整数秒数。" + +#: lib/Format.php lib/OperatorPage.php +msgid "Never" +msgstr "从未" + +#: lib/Format.php +#, php-format +msgid "%d seconds ago" +msgstr "%d 秒前" + +#: lib/Format.php +#, php-format +msgid "%d minutes ago" +msgstr "%d 分钟前" + +#: lib/Format.php +#, php-format +msgid "%d hours ago" +msgstr "%d 小时前" + +#: lib/Format.php +#, php-format +msgid "%d days ago" +msgstr "%d 天前" + +#: lib/Format.php +#, php-format +msgid "%d B" +msgstr "%d B" + +#: lib/Format.php +#, php-format +msgid "%s KiB" +msgstr "%s KiB" + +#: lib/Format.php +#, php-format +msgid "%s MiB" +msgstr "%s MiB" + +#: lib/GraphLinks.php +#, php-format +msgid "Parallel Filesystem view of %s" +msgstr "%s 的并行文件系统视图" + +#: lib/HealthPage.php +msgid "Parallel Filesystem Warnings" +msgstr "并行文件系统警告" + +#: lib/HealthPage.php +msgid "No warnings." +msgstr "无警告。" + +#: lib/HealthPage.php +msgid "Install the Templates Again" +msgstr "重新安装模板" + +#: lib/HealthPage.php +msgid "Readers" +msgstr "读取器" + +#: lib/HealthPage.php +msgid "Failed" +msgstr "失败" + +#: lib/HealthPage.php +msgid "Last Completed Run" +msgstr "上次完成的运行" + +#: lib/HealthPage.php +msgid "Last Run" +msgstr "上次运行" + +#: lib/HealthPage.php +msgid "Not Reached" +msgstr "未连接" + +#: lib/HealthPage.php +msgid "Read" +msgstr "读取" + +#: lib/HealthPage.php +msgid "No reader has run yet." +msgstr "尚无读取器运行。" + +#: lib/HealthPage.php +msgid "Duration" +msgstr "持续时间" + +#: lib/HealthPage.php +msgid "Failure" +msgstr "故障" + +#: lib/HealthPage.php +msgid "Last Read" +msgstr "上次读取" + +#: lib/HealthPage.php +msgid "Last Success" +msgstr "上次成功" + +#: lib/HealthPage.php +msgid "Node" +msgstr "节点" + +#: lib/HealthPage.php +msgid "Reported Version" +msgstr "报告的版本" + +#: lib/HealthPage.php +msgid "Response Size" +msgstr "响应大小" + +#: lib/HealthPage.php +msgid "disabled" +msgstr "已禁用" + +#: lib/HealthPage.php +#, php-format +msgid "%s s" +msgstr "%s 秒" + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the node answered without the fixed read script framing. Its key may not be limited to a forced command running pfs-read.sh." +msgstr "%s:节点响应不符合固定读取脚本的封装格式。其密钥可能未限制为运行 pfs-read.sh 的强制命令。" + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the node host key is not in the known hosts file, or it changed. Check the key before adding it." +msgstr "%s:节点主机密钥不在已知主机文件中,或已更改。添加前请核实密钥。" + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the endpoint resolves outside the networks allowed for poller %d, so it is not read." +msgstr "%s:端点解析到轮询器 %d 允许网络之外,因此不读取。" + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: the read script printed %d parameters the plugin does not read, so it is not the shipped pfs-read.sh. The node may be exposing more than the plugin needs." +msgstr "%s:读取脚本输出了插件不读取的 %d 个参数,因此不是随附的 pfs-read.sh。节点可能暴露了超出插件需要的信息。" + +#: lib/HealthWarnings.php +#, php-format +msgid "%s: %d target names in the node output did not match the expected pattern or filesystem and were ignored." +msgstr "%s:节点输出中的 %d 个目标名称与预期模式或文件系统不匹配,已忽略。" + +#: lib/HealthWarnings.php +#, php-format +msgid "The reader on poller %d has not completed a run in the last %d seconds. Values from its nodes are getting stale." +msgstr "轮询器 %d 上的读取器在过去 %d 秒内未完成运行。其节点值正逐渐过期。" + +#: lib/HealthWarnings.php +#, php-format +msgid "Installing the Parallel Filesystem templates failed: %s" +msgstr "安装并行文件系统模板失败:%s" + +#: lib/HealthWarnings.php +msgid "The Parallel Filesystem templates are not installed, so no device can be added." +msgstr "尚未安装并行文件系统模板,因此无法添加设备。" + +#: lib/HealthWarnings.php +#, php-format +msgid "The data query file resource/script_server/%s is missing from Cacti or differs from the one this plugin ships, so the data queries cannot list targets." +msgstr "Cacti 中缺少数据查询文件 resource/script_server/%s,或文件与插件提供的版本不同,因此数据查询无法列出目标。" + +#: lib/HealthWarnings.php +#, php-format +msgid "Filesystem %s is mapped to device %d, which no longer exists." +msgstr "文件系统 %s 映射到已不存在的设备 %d。" + +#: lib/HealthWarnings.php +#, php-format +msgid "The device of filesystem %s is polled by poller %d, but its nodes are read by poller %d, whose cache the device's data sources need." +msgstr "文件系统 %s 的设备由轮询器 %d 轮询,但其节点由轮询器 %d 读取;设备的数据源需要后者的缓存。" + +#: lib/HealthWarnings.php +#, php-format +msgid "The SSH key file %s does not exist on this server." +msgstr "此服务器上不存在 SSH 密钥文件 %s。" + +#: lib/HealthWarnings.php +#, php-format +msgid "The SSH key file %s can be read or written by users other than its owner (mode %s). Limit it to the poller user." +msgstr "SSH 密钥文件 %s 可被所有者以外的用户读取或写入(权限 %s)。请仅允许轮询用户访问。" + +#: lib/HealthWarnings.php +#, php-format +msgid "The known hosts file %s does not exist on this server, so no node can be read from it." +msgstr "此服务器上不存在已知主机文件 %s,因此无法读取任何节点。" + +#: lib/HealthWarnings.php +#, php-format +msgid "The SSH client %s does not exist on this server." +msgstr "此服务器上不存在 SSH 客户端 %s。" + +#: lib/NodeInput.php +msgid "Filesystem: choose one of the registered filesystems." +msgstr "文件系统:请选择已注册的文件系统。" + +#: lib/NodeInput.php +msgid "Name: use 1 to 64 letters, digits, dots, dashes, or underscores, starting with a letter or digit." +msgstr "名称:使用 1 至 64 个字母、数字、点、连字符或下划线,以字母或数字开头。" + +#: lib/NodeInput.php +msgid "Role: choose one of the listed roles." +msgstr "角色:请选择列出的角色。" + +#: lib/NodeInput.php +msgid "Port: enter a port from 1 to 65535." +msgstr "端口:请输入 1 至 65535 之间的端口号。" + +#: lib/NodeInput.php +msgid "Login Name: use a lower-case account name of at most 32 characters, starting with a letter or underscore." +msgstr "登录名:使用最多 32 个字符的小写账户名,以字母或下划线开头。" + +#: lib/NodeInput.php +msgid "Endpoint: enter a host name or an IP address only, without a user, port, or path." +msgstr "端点:仅输入主机名或 IP 地址,不包含用户、端口或路径。" + +#: lib/NodeInput.php +msgid "Endpoint: the name does not resolve on this server." +msgstr "端点:此名称无法在本服务器上解析。" + +#: lib/NodeInput.php +#, php-format +msgid "Endpoint: it resolves to %s, which is not inside the networks allowed for this poller. Add the network first." +msgstr "端点:解析结果为 %s,不在此轮询器允许的网络内。请先添加网络。" + +#: lib/NodeRole.php +msgid "Management server (MGS)" +msgstr "管理服务器(MGS)" + +#: lib/NodeRole.php +msgid "Metadata server (MDS)" +msgstr "元数据服务器(MDS)" + +#: lib/NodeRole.php +msgid "Object storage server (OSS)" +msgstr "对象存储服务器(OSS)" + +#: lib/NodeRole.php +msgid "Client" +msgstr "客户端" + +#: lib/OperatorPage.php +msgid "Review the recorded observations below. Acknowledgments are personal to this session, expire when observations change, and never suppress alerts or change health." +msgstr "查看下方记录的观测结果。确认记录仅对当前会话中的您有效,在观测结果变化时失效,且不会抑制告警或更改健康状态。" + +#: lib/OperatorPage.php lib/Pages.php +msgid "Parallel Filesystem Operations" +msgstr "并行文件系统运维" + +#: lib/OperatorPage.php +msgid "Investigation" +msgstr "调查" + +#: lib/OperatorPage.php +msgid "Object" +msgstr "对象" + +#: lib/OperatorPage.php +msgid "Observed (UTC)" +msgstr "观测时间(UTC)" + +#: lib/OperatorPage.php +msgid "Unknown or stale" +msgstr "未知或已过期" + +#: lib/OperatorPage.php +msgid "Acknowledged; health unchanged." +msgstr "已确认;健康状态未改变。" + +#: lib/OperatorPage.php +msgid "Acknowledge" +msgstr "确认" + +#: lib/OperatorPage.php +msgid "No observations are available for devices you may access." +msgstr "您有权访问的设备暂无观测结果。" + +#: lib/Pages.php +msgid "Parallel Filesystem Operator" +msgstr "并行文件系统操作员" + +#: lib/Pages.php +msgid "Parallel Filesystem View" +msgstr "并行文件系统查看" + +#: lib/Pages.php +msgid "Parallel Filesystem Admin" +msgstr "并行文件系统管理" + +#: lib/Pages.php lib/TargetsPage.php setup.php +msgid "Parallel Filesystems" +msgstr "并行文件系统" + +#: lib/Pages.php +msgid "Parallel Filesystem Registry" +msgstr "并行文件系统注册表" + +#: lib/Pages.php +msgid "Parallel Filesystem Health" +msgstr "并行文件系统健康" + +#: lib/ReadError.php +msgid "The plugin settings for node access are incomplete or unusable" +msgstr "节点访问的插件设置不完整或不可用" + +#: lib/ReadError.php +msgid "The endpoint resolves outside the networks allowed for its poller" +msgstr "端点解析到其轮询器允许网络之外" + +#: lib/ReadError.php +msgid "The endpoint name does not resolve" +msgstr "端点名称无法解析" + +#: lib/ReadError.php +msgid "The node could not be reached" +msgstr "无法连接节点" + +#: lib/ReadError.php +msgid "The node host key is unknown or changed" +msgstr "节点主机密钥未知或已更改" + +#: lib/ReadError.php +msgid "The node refused the key" +msgstr "节点拒绝了密钥" + +#: lib/ReadError.php +msgid "The read exceeded its time limit" +msgstr "读取超出时间限制" + +#: lib/ReadError.php +msgid "The response exceeded the size limit" +msgstr "响应超出大小限制" + +#: lib/ReadError.php +msgid "The read command failed" +msgstr "读取命令失败" + +#: lib/ReadError.php +msgid "The node did not answer with the fixed read script" +msgstr "节点未使用固定读取脚本响应" + +#: lib/ReadError.php +msgid "The response ended before the read script finished" +msgstr "读取脚本结束前响应已结束" + +#: lib/Settings.php +msgid "Node Access" +msgstr "节点访问" + +#: lib/Settings.php +msgid "Absolute path to the ssh client on each poller that reads nodes." +msgstr "每个读取节点的轮询器上 ssh 客户端的绝对路径。" + +#: lib/Settings.php +msgid "SSH Client" +msgstr "SSH 客户端" + +#: lib/Settings.php +msgid "Absolute path, on each poller that reads nodes, to the private key whose public half each node lists in authorized_keys with a forced command running pfs-read.sh. Readable only by the poller user. The plugin never creates, copies, or prints it." +msgstr "每个读取节点的轮询器上的私钥绝对路径。每个节点的 authorized_keys 必须列出对应公钥,并强制运行 pfs-read.sh。只允许轮询用户读取。插件从不创建、复制或输出此文件。" + +#: lib/Settings.php +msgid "SSH Key File" +msgstr "SSH 密钥文件" + +#: lib/Settings.php +msgid "Absolute path to the known_hosts file holding each node host key under the node endpoint name. A node whose key is missing or changed is not read." +msgstr "known_hosts 文件的绝对路径,文件以节点端点名称保存每个节点的主机密钥。密钥缺失或更改的节点不会被读取。" + +#: lib/Settings.php +msgid "Known Hosts File" +msgstr "已知主机文件" + +#: lib/Settings.php +msgid "Connect Timeout" +msgstr "连接超时" + +#: lib/Settings.php +msgid "Seconds to wait for a node to accept the connection." +msgstr "等待节点接受连接的秒数。" + +#: lib/Settings.php +msgid "Read Timeout" +msgstr "读取超时" + +#: lib/Settings.php +msgid "Seconds one node read may take in total before it is stopped and recorded as failed." +msgstr "单次节点读取允许的总秒数,超出后停止并记录为失败。" + +#: lib/Settings.php +msgid "KiB one node may return. A larger answer is discarded and recorded as failed." +msgstr "单个节点可返回的 KiB 数。更大的响应会丢弃并记录为失败。" + +#: lib/Settings.php +msgid "Maximum Response" +msgstr "最大响应" + +#: lib/Settings.php +msgid "Reader" +msgstr "读取器" + +#: lib/Settings.php +msgid "Reader Time Budget" +msgstr "读取器时间预算" + +#: lib/Settings.php +msgid "Seconds one reader run may spend before it stops starting node reads. Keep it below the poller interval; unread nodes are read on the next run." +msgstr "读取器每次运行允许的秒数,达到后不再开始新的节点读取。应低于轮询间隔;未读节点留待下次运行。" + +#: lib/Settings.php +msgid "Concurrent Reads" +msgstr "并发读取" + +#: lib/Settings.php +msgid "Node reads one reader runs at the same time." +msgstr "一个读取器同时执行的节点读取数。" + +#: lib/Settings.php +msgid "Uninstall" +msgstr "卸载" + +#: lib/Settings.php +msgid "Keep Plugin Tables on Uninstall" +msgstr "卸载时保留插件表" + +#: lib/Settings.php +msgid "When checked, uninstalling the plugin keeps its filesystems, nodes, inventory, and cache. Clear it to have the uninstall drop them; export the registry first from the Parallel Filesystem Admin page. Storage nodes are never contacted either way." +msgstr "选中时,卸载会保留文件系统、节点、清单和缓存。取消选中则删除这些内容;请先从并行文件系统管理页面导出注册表。无论哪种情况,都不会连接存储节点。" + +#: lib/Settings.php +msgid "Delete the Devices This Plugin Created on Uninstall" +msgstr "卸载时删除此插件创建的设备" + +#: lib/Settings.php +msgid "When checked, uninstalling the plugin deletes the devices it created for filesystems, with their graphs and data sources, as deleting them in Cacti would. Existing devices that were mapped to a filesystem are never deleted. RRD files are removed only if Cacti's own RRD cleanup setting removes them. Cleared, the devices stay." +msgstr "勾选后,卸载插件会像在 Cacti 中删除设备一样,删除插件为文件系统创建的设备及其图表和数据源。映射到文件系统的现有设备绝不会删除。RRD 文件仅在 Cacti 自身的 RRD 清理设置要求时删除。取消勾选则保留设备。" + +#: lib/TargetsPage.php +msgid "No filesystem is visible to you." +msgstr "没有您可查看的文件系统。" + +#: lib/TargetsPage.php +#, php-format +msgid "Filesystem %s" +msgstr "文件系统 %s" + +#: lib/TargetsPage.php +msgid "Graphs of this filesystem" +msgstr "此文件系统的图表" + +#: lib/TargetsPage.php +msgid "Condition" +msgstr "状况" + +#: lib/TargetsPage.php +msgid "Freshness" +msgstr "时效性" + +#: lib/TargetsPage.php +msgid "Known Values" +msgstr "已知值" + +#: lib/TargetsPage.php +msgid "Last Seen" +msgstr "上次发现" + +#: lib/TargetsPage.php +msgid "Recovery" +msgstr "恢复" + +#: lib/TargetsPage.php +msgid "Review" +msgstr "审核" + +#: lib/TargetsPage.php +msgid "Source Node" +msgstr "源节点" + +#: lib/TargetsPage.php +msgid "No targets found yet." +msgstr "尚未发现目标。" + +#: pfs_admin.php +msgid "That record belongs to a Cacti device you do not have permission for. Nothing was changed." +msgstr "此记录属于您无权访问的 Cacti 设备。未作任何更改。" + +#: pfs_admin.php +msgid "Name: another filesystem of this backend already uses this name." +msgstr "名称:此后端的另一个文件系统已使用此名称。" + +#: pfs_admin.php +msgid "The filesystem could not be saved." +msgstr "无法保存文件系统。" + +#: pfs_admin.php +msgid "The filesystem was saved." +msgstr "文件系统已保存。" + +#: pfs_admin.php +msgid "The filesystem, its nodes, and its inventory were deleted. Its Cacti device, data sources, and graphs were kept. No node was contacted." +msgstr "文件系统、其节点和清单已删除。其 Cacti 设备、数据源和图表已保留。未连接任何节点。" + +#: pfs_admin.php +msgid "Name: another node already uses this name." +msgstr "名称:另一个节点已使用此名称。" + +#: pfs_admin.php +msgid "The node could not be saved." +msgstr "无法保存节点。" + +#: pfs_admin.php +msgid "The node was saved." +msgstr "节点已保存。" + +#: pfs_admin.php +msgid "The node was deleted. Targets it reported keep their history." +msgstr "节点已删除。其报告过的目标保留历史记录。" + +#: pfs_admin.php +msgid "Enter a network as an address and prefix length, such as 10.20.0.0/16." +msgstr "请输入网络地址和前缀长度,例如 10.20.0.0/16。" + +#: pfs_admin.php +msgid "No device was added: the filesystem already has one, or the templates are not installed." +msgstr "未添加设备:文件系统已关联设备,或模板尚未安装。" + +#: pfs_admin.php +msgid "The device could not be mapped. It may be mapped to another filesystem." +msgstr "无法映射设备。它可能已映射到另一个文件系统。" + +#: pfs_admin.php +msgid "The device was mapped and the data queries and overview graphs were added." +msgstr "设备已映射,数据查询和概览图表已添加。" + +#: pfs_admin.php +msgid "Cacti did not create the device. See the Cacti log." +msgstr "Cacti 未创建设备。请查看 Cacti 日志。" + +#: pfs_admin.php +msgid "The device, its data queries, and its overview graphs were created." +msgstr "设备、数据查询及概览图表已创建。" + +#: pfs_admin.php +msgid "The device is no longer mapped. It and its graphs were kept; its data queries list no targets until it is mapped again." +msgstr "设备已取消映射。设备及其图表已保留;重新映射之前,数据查询不会列出目标。" + +#: pfs_health.php +msgid "The templates and data query files were installed." +msgstr "模板和数据查询文件已安装。" + +#: pfs_health.php +#, php-format +msgid "The templates could not be installed: %s" +msgstr "无法安装模板:%s" + +#: pfs_operator.php +msgid "Monitoring view" +msgstr "监控视图" + +#: pfs_operator.php +msgid "Observations could not be read. Ask an administrator to check the plugin log." +msgstr "无法读取观测结果。请联系管理员检查插件日志。" + +#: setup.php +#, php-format +msgid "The Parallel Filesystem plugin requires PHP %s or later. This server runs PHP %s, so the plugin was not installed or enabled." +msgstr "并行文件系统插件需要 PHP %s 或更高版本。此服务器运行 PHP %s,因此未安装或启用插件。" + +#: setup.php +msgid "The Parallel Filesystem plugin is not enabled." +msgstr "并行文件系统插件未启用。" + +#: setup.php +#, php-format +msgid "The Parallel Filesystem plugin requires PHP %s or later." +msgstr "并行文件系统插件需要 PHP %s 或更高版本。" + +#: setup.php +msgid "Management" +msgstr "管理" diff --git a/pfs_operator.php b/pfs_operator.php new file mode 100644 index 0000000..d1ff0df --- /dev/null +++ b/pfs_operator.php @@ -0,0 +1,103 @@ + + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This file is part of plugin_pfs, a plugin for Cacti. + * https://github.com/somethingwithproof/plugin_pfs + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + +use Somethingwithproof\Pfs\OperatorPage; + +chdir('../../'); +include('./include/auth.php'); +include_once('./plugins/pfs/setup.php'); + +if (!pfs_page_start()) { + exit; +} +require_once('./plugins/pfs/include/operator.php'); + +$user = (int) ($_SESSION['sess_user_id'] ?? 0); +$allowed = $user > 0 && api_plugin_user_realm_auth('pfs_operator.php'); + +if (!$allowed) { + http_response_code(403); + exit; +} +$actions = []; +$action = (string) get_nfilter_request_var('action'); +$session = $_SESSION['pfs_triage'] ?? []; +$session = is_array($session) ? $session : []; + +try { + // Re-read on POST too: stale forms never retain revoked device access. + $rows = pfs_operator_rows(); + $now = time(); + + if ($action !== '' && $action !== 'default') { + $method = $_SERVER['REQUEST_METHOD'] ?? ''; + $status = OperatorPage::actionStatus($allowed, $action, $method, $method === 'POST' && csrf_check(false), array_merge(['acknowledge'], array_keys($actions))); + + if ($status !== 200) { + http_response_code($status); + + if ($status === 405) { + header('Allow: POST'); + } + exit; + } + $id = (string) get_nfilter_request_var('id'); + $row = null; + + foreach ($rows as $candidate) { + if ($candidate['id'] === $id) { + $row = $candidate; + + break; + } + } + + if ($row === null) { + http_response_code(403); + exit; + } + $fingerprint = (string) get_nfilter_request_var('fingerprint'); + + if (!hash_equals(OperatorPage::fingerprint($row), $fingerprint)) { + http_response_code(409); + exit; + } + + if ($action === 'acknowledge') { + if (!OperatorPage::acknowledge($session, $row, $fingerprint, $user, $now)) { + http_response_code(409); + exit; + } + $_SESSION['pfs_triage'] = $session; + } + cacti_log('Operator ' . $action . ' by user ' . $user . ' on object ' . hash('sha256', $id), false, 'PFS'); + header('Location: pfs_operator.php'); + exit; + } + top_header(); + print '

' . html_escape(__('Monitoring view', 'pfs')) . '

'; + OperatorPage::render($rows, $session, $user, $now, $actions); + bottom_footer(); +} catch (Throwable $error) { + cacti_log('Operator page failed (' . get_class($error) . ')', false, 'PFS'); + http_response_code(503); + top_header(); + print '

' . html_escape(__('Observations could not be read. Ask an administrator to check the plugin log.', 'pfs')) . '

'; + bottom_footer(); +} diff --git a/phpstan.neon b/phpstan.neon index d107c26..ad4da47 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -23,6 +23,7 @@ parameters: paths: - lib - setup.php + - include/operator.php - include/unbooted-uninstall.php - scripts scanDirectories: diff --git a/setup.php b/setup.php index 75aaa9f..0f11081 100644 --- a/setup.php +++ b/setup.php @@ -100,13 +100,18 @@ function plugin_pfs_check_config(): bool { } /** - * Common start of every page script, after include/auth.php has authorized - * the realm. Refuses on an unsupported runtime or a disabled plugin, because - * Cacti keeps plugin realms registered while a plugin is disabled. + * Common start after include/auth.php establishes the user. Recheck the + * realm here because cookie and Basic login restore the user after the + * alternate-realms hook. Disabled plugins and unsupported runtimes refuse. */ function pfs_page_start(): bool { if (pfs_boot() && api_plugin_is_enabled('pfs')) { - return true; + if (pfs_page_allowed()) { + return true; + } + http_response_code(403); + + return false; } top_header(); @@ -252,12 +257,14 @@ function pfs_setup_hooks(bool $grant = false): void { include_once($config['library_path'] . '/poller.php'); } + $enabled = (new \Somethingwithproof\Pfs\Schema(false))->pluginEnabled(); + foreach (\Somethingwithproof\Pfs\Schema::HOOKS as $hook => $function) { - api_plugin_register_hook('pfs', $hook, $function, 'setup.php'); + api_plugin_register_hook('pfs', $hook, $function, 'setup.php', $enabled); } foreach (\Somethingwithproof\Pfs\Pages::realms() as $realm) { - api_plugin_register_realm('pfs', implode(',', $realm['files']), $realm['name'], $grant); + api_plugin_register_realm('pfs', implode(',', $realm['files']), $realm['name'], $grant && $realm['files'] !== \Somethingwithproof\Pfs\Pages::OPERATOR); } } @@ -380,6 +387,10 @@ function pfs_config_arrays(): void { function pfs_config_settings(): void { global $tabs, $settings; + if (PHP_SAPI !== 'cli' && !api_plugin_user_realm_auth('pfs_admin.php')) { + return; + } + if (!pfs_boot()) { return; } @@ -393,10 +404,17 @@ function pfs_config_settings(): void { * @return array */ function pfs_draw_navigation_text($nav) { + global $current_user; + if (!pfs_boot()) { return $nav; } + // Refresh settings after core restores cookie or Basic authentication. + if (get_current_page() === 'settings.php' && (PHP_SAPI === 'cli' || ($current_user['enabled'] ?? '') === 'on')) { + pfs_config_settings(); + } + return array_merge($nav, \Somethingwithproof\Pfs\Pages::navigation()); } @@ -549,3 +567,63 @@ function pfs_reader_with(int $pollerId, \Somethingwithproof\Pfs\NodeSources $sou $holder !== '' ? $holder : 'poller' . $pollerId . '-' . getmypid() . '-' . bin2hex(random_bytes(4)) ); } + +/** Resolve role inheritance against Cacti's current user and group grants. */ +function pfs_auth_alternate_realms(): void { + global $user_auth_realm_filenames; + + static $deferred = array(); + + foreach ($deferred as $file => $realm) { + $user_auth_realm_filenames[$file] = $realm; + } + $deferred = array(); + + if (!api_plugin_is_enabled('pfs')) { + return; + } + + if (empty($_SESSION['sess_user_id'])) { + // Core restores cookie and Basic authentication after this hook. Only + // these entrypoints defer the realm check to their post-auth guard. + $page = get_current_page(); + + if (in_array($page, array('pfs.php', 'pfs_operator.php'), true) && isset($user_auth_realm_filenames[$page])) { + $deferred[$page] = $user_auth_realm_filenames[$page]; + $user_auth_realm_filenames[$page] = -1; + } + + return; + } + $operator = 'pfs_operator.php'; + $admin = 'pfs_admin.php'; + $files = array('pfs.php'); + $realm = $user_auth_realm_filenames[$admin] ?? 0; + if ($realm > 0 && is_realm_allowed($realm)) { + $files[] = $operator; + } else { + $realm = $user_auth_realm_filenames[$operator] ?? 0; + if ($realm <= 0 || !is_realm_allowed($realm)) { + return; + } + } + foreach ($files as $file) { + $user_auth_realm_filenames[$file] = $realm; + } +} + +/** Recheck the authenticated user before a plugin page reads data or acts. */ +function pfs_page_allowed(): bool { + global $current_user; + + pfs_auth_alternate_realms(); + $userId = $current_user['id'] ?? null; + $sessionId = $_SESSION['sess_user_id'] ?? null; + + return (is_int($userId) || (is_string($userId) && ctype_digit($userId))) + && (is_int($sessionId) || (is_string($sessionId) && ctype_digit($sessionId))) + && (int) $userId > 0 && (int) $userId === (int) $sessionId + && api_plugin_is_enabled('pfs') + && ($current_user['enabled'] ?? '') === 'on' + && api_plugin_user_realm_auth(get_current_page()); +} diff --git a/tests/Integration/LifecycleTest.php b/tests/Integration/LifecycleTest.php index 177a48a..0c8f0c6 100644 --- a/tests/Integration/LifecycleTest.php +++ b/tests/Integration/LifecycleTest.php @@ -32,7 +32,7 @@ 'plugin_pfs_target', ]; -const PFS_HOOKS = ['api_device_new', 'config_arrays', 'config_settings', 'device_remove', 'draw_navigation_text', 'graph_buttons', 'poller_bottom']; +const PFS_HOOKS = ['api_device_new', 'auth_alternate_realms', 'config_arrays', 'config_settings', 'device_remove', 'draw_navigation_text', 'graph_buttons', 'poller_bottom']; const PFS_T = 1800000000; @@ -44,7 +44,7 @@ lifecycle('reset'); }); -it('installs fresh with tracked tables, hooks, and both realms, leaving the plugin disabled', function () { +it('installs fresh with tracked tables, hooks, and three realms, leaving the plugin disabled', function () { $state = lifecycle('install'); expect($state['plugin']['status'])->toEqual('4') @@ -54,8 +54,9 @@ ->and($state['tracked'])->toBe(PFS_TABLES) ->and(array_keys($state['hooks']))->toBe(PFS_HOOKS) ->and($state['realms'])->toEqual([ - 'pfs.php' => 'Parallel Filesystem View', + 'pfs.php' => 'Parallel Filesystem View', 'pfs_admin.php,pfs_health.php' => 'Parallel Filesystem Admin', + 'pfs_operator.php' => 'Parallel Filesystem Operator', ]) ->and($state['admin'])->toBe(2); }); @@ -102,7 +103,7 @@ expect($state['result'])->toBeTrue() ->and(array_keys($state['hooks']))->toBe(PFS_HOOKS) - ->and($state['realms'])->toHaveCount(2); + ->and($state['realms'])->toHaveCount(3); }); it('finishes an upgrade that was interrupted after creating only some tables', function () { @@ -297,7 +298,7 @@ expect(lifecycle('install')['admin'])->toBe(2); $repair = lifecycle('repair_as_viewer'); - expect($repair['realms'])->toHaveCount(2) + expect($repair['realms'])->toHaveCount(3) ->and($repair['result'])->toBe(['viewer_realms' => 0]); }); @@ -401,3 +402,23 @@ ->and($r['after_expiry'])->toBe(['total' => 1, 'read' => 1, 'skipped' => 0]) ->and($r['final'])->toMatchArray(['health' => 1, 'targets' => 2, 'observations' => 18]); }); + +it('preserves old grants and resolves the three roles through Cacti including groups', function () { + lifecycle('install'); + lifecycle('enable'); + $roles = lifecycle('operator_roles')['result']; + expect($roles['ids_preserved'])->toBeTrue() + ->and($roles['viewer_grants'])->toBe([$roles['expected_view']]) + ->and($roles['hook_enabled'])->toBe(1) + ->and($roles['viewer'])->toBe([true, false, false]) + ->and($roles['operator'])->toBe([true, true, false]) + ->and($roles['admin'])->toBe([true, true, true]) + ->and($roles['revoked'])->toBe([false, false, false]) + ->and($roles['group_operator'])->toBe([true, true, false]) + ->and($roles['disabled_group'])->toBe([false, false, false]) + ->and($roles['first_request']['viewer'])->toBe([[true, true, true], [true, false, true], [false, false, true]]) + ->and($roles['first_request']['operator'])->toBe([[true, true, true], [true, true, true], [false, false, true]]) + ->and($roles['first_request']['admin'])->toBe([[true, true, true], [true, true, true], [false, true, true]]) + ->and($roles['first_request']['revoked'])->toBe([false, false, false]) + ->and($roles['disabled_user'])->toBe([false, false, false]); +}); diff --git a/tests/Unit/OperatorTest.php b/tests/Unit/OperatorTest.php new file mode 100644 index 0000000..4d88995 --- /dev/null +++ b/tests/Unit/OperatorTest.php @@ -0,0 +1,98 @@ + + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This file is part of plugin_pfs, a plugin for Cacti. + * https://github.com/somethingwithproof/plugin_pfs + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + +use Somethingwithproof\Pfs\OperatorPage; + +function pfs_triage_fixture(): array { + return ['id' => '7', 'name' => '', 'state' => 'failed', 'observed' => 900, 'interval' => 60, 'detail' => 'timeout']; +} + +it('requires an operator, a known action, POST and a valid CSRF token', function () { + $actions = ['acknowledge', 'retry']; + expect(OperatorPage::actionStatus(false, 'retry', 'POST', true, $actions))->toBe(403) + ->and(OperatorPage::actionStatus(true, 'delete', 'POST', true, $actions))->toBe(400) + ->and(OperatorPage::actionStatus(true, 'retry', 'GET', true, $actions))->toBe(405) + ->and(OperatorPage::actionStatus(true, 'retry', 'POST', false, $actions))->toBe(403) + ->and(OperatorPage::actionStatus(true, 'retry', 'POST', true, $actions))->toBe(200); +}); + +it('acknowledges only unchanged, current evidence for the acting user', function () { + $row = pfs_triage_fixture(); + $session = []; + $fingerprint = OperatorPage::fingerprint($row); + expect(OperatorPage::acknowledge($session, $row, $fingerprint, 2, 1000))->toBeTrue() + ->and(OperatorPage::acknowledged($session, $row, 2, 1000))->toBeTrue() + ->and(OperatorPage::acknowledged($session, $row, 3, 1000))->toBeFalse() + ->and(OperatorPage::acknowledged($session, $row, 2, 1021))->toBeFalse() + ->and(OperatorPage::acknowledged($session, array_replace($row, ['state' => 'ok']), 2, 1000))->toBeFalse() + ->and(OperatorPage::acknowledged($session, array_replace($row, ['observed' => 950]), 2, 1000))->toBeFalse() + ->and(OperatorPage::acknowledge($session, $row, 'forged', 2, 1000))->toBeFalse() + ->and(OperatorPage::acknowledge($session, $row, $fingerprint, 0, 1000))->toBeFalse() + ->and(OperatorPage::acknowledge($session, $row, $fingerprint, 2, 800))->toBeFalse(); +}); + +it('bounds personal acknowledgments and drops the previous users entries', function () { + $session = []; + + for ($i = 1; $i <= 120; $i++) { + $row = array_replace(pfs_triage_fixture(), ['id' => (string) $i]); + OperatorPage::acknowledge($session, $row, OperatorPage::fingerprint($row), 2, 1000); + } + expect($session['entries'])->toHaveCount(100) + ->and($session['entries'])->not->toHaveKey('1'); + $row = pfs_triage_fixture(); + OperatorPage::acknowledge($session, $row, OperatorPage::fingerprint($row), 3, 1000); + expect($session['entries'])->toHaveCount(1)->and($session['user'])->toBe(3); +}); + +it('never treats absent or future observations as fresh', function () { + $row = pfs_triage_fixture(); + expect(OperatorPage::fresh(array_replace($row, ['observed' => 0]), 1000))->toBeFalse() + ->and(OperatorPage::fresh(array_replace($row, ['observed' => 1001]), 1000))->toBeFalse() + ->and(OperatorPage::fresh($row, 1020))->toBeTrue() + ->and(OperatorPage::fresh($row, 1021))->toBeFalse(); +}); + +it('ignores malformed session acknowledgments without hiding current health', function () { + $row = pfs_triage_fixture(); + expect(OperatorPage::acknowledged(['user' => 2, 'entries' => 'bad'], $row, 2, 1000))->toBeFalse(); + $session = ['user' => 2, 'entries' => ['7' => ['at' => 'invalid']]]; + expect(OperatorPage::acknowledge($session, $row, OperatorPage::fingerprint($row), 2, 1000))->toBeTrue() + ->and($row['state'])->toBe('failed'); +}); + +it('distinguishes failed operator reads from an empty registry', function () { + $original = $GLOBALS['__pfs_db_rows']; + $clock = new Somethingwithproof\Pfs\SystemClock(); + $repositories = [ + 'plugin_pfs_filesystem' => new Somethingwithproof\Pfs\FilesystemRepository(false, $clock), + 'plugin_pfs_node' => new Somethingwithproof\Pfs\NodeRepository(false, $clock), + 'plugin_pfs_node_health' => new Somethingwithproof\Pfs\NodeHealthRepository(false), + ]; + try { + foreach ($repositories as $table => $repository) { + $GLOBALS['__pfs_db_rows'] = [$table => false]; + expect(fn () => $repository->all(true))->toThrow(RuntimeException::class); + $GLOBALS['__pfs_db_rows'] = [$table => []]; + expect($repository->all(true))->toBe([]); + } + } finally { + $GLOBALS['__pfs_db_rows'] = $original; + } +}); diff --git a/tests/bin/lifecycle.php b/tests/bin/lifecycle.php index f96a178..ca2bc23 100644 --- a/tests/bin/lifecycle.php +++ b/tests/bin/lifecycle.php @@ -205,6 +205,10 @@ case 'reader_kill': include($config['base_path'] . '/plugins/pfs/tests/bin/reader-restart.php'); + break; + case 'operator_roles': + include(__DIR__ . '/operator-roles.php'); + break; case 'state': break; diff --git a/tests/bin/operator-roles.php b/tests/bin/operator-roles.php new file mode 100644 index 0000000..b0fe8e0 --- /dev/null +++ b/tests/bin/operator-roles.php @@ -0,0 +1,114 @@ + + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This file is part of plugin_pfs, a plugin for Cacti. + * https://github.com/somethingwithproof/plugin_pfs + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + +// Executed only by lifecycle.php in a disposable Cacti database. +if (PHP_SAPI !== 'cli') { + exit(1); +} + +if (getenv('PFS_TEST_DATABASE') !== 'disposable') { + exit(2); +} +require_once $config['library_path'] . '/auth.php'; +require_once $config['base_path'] . '/plugins/pfs/setup.php'; +pfs_boot(); +$view = \Somethingwithproof\Pfs\Pages::VIEW[0]; +$admin = \Somethingwithproof\Pfs\Pages::ADMIN[0]; +$operator = 'pfs_operator.php'; +api_plugin_load_realms(); +$old = [$view => $user_auth_realm_filenames[$view], $admin => $user_auth_realm_filenames[$admin]]; +// Emulate an installed two-realm release without modifying the existing IDs. +$operatorId = $user_auth_realm_filenames[$operator]; +db_execute_prepared('DELETE FROM user_auth_realm WHERE realm_id = ?', [$operatorId]); +db_execute_prepared('DELETE FROM plugin_realms WHERE id = ?', [$operatorId - 100]); +db_execute("DELETE FROM plugin_hooks WHERE name = 'pfs' AND hook = 'auth_alternate_realms'"); +db_execute("INSERT INTO user_auth (username, password, realm, full_name, enabled) VALUES ('pfs_role_test', '', 0, 'Role test', 'on')"); +$user = (int) db_fetch_insert_id(); +db_execute_prepared('INSERT INTO user_auth_realm (user_id, realm_id) VALUES (?, ?)', [$user, $old[$view]]); +$_SESSION = ['sess_user_id' => $user]; +plugin_pfs_upgrade(); +api_plugin_load_realms(); +$result = [ + 'ids_preserved' => $old === [$view => $user_auth_realm_filenames[$view], $admin => $user_auth_realm_filenames[$admin]], + 'viewer_grants' => array_map('intval', array_column(db_fetch_assoc_prepared('SELECT realm_id FROM user_auth_realm WHERE user_id = ?', [$user]), 'realm_id')), + 'expected_view' => $old[$view], + 'hook_enabled' => (int) db_fetch_cell("SELECT status FROM plugin_hooks WHERE name = 'pfs' AND hook = 'auth_alternate_realms'"), +]; +$realms = [$view => $user_auth_realm_filenames[$view], $operator => $user_auth_realm_filenames[$operator], $admin => $user_auth_realm_filenames[$admin]]; +$check = static function () use ($user, $view, $operator, $admin): array { + $_SESSION = ['sess_user_id' => $user]; + api_plugin_load_realms(); + pfs_auth_alternate_realms(); + + return [api_plugin_user_realm_auth($view), api_plugin_user_realm_auth($operator), api_plugin_user_realm_auth($admin)]; +}; + +foreach (['viewer' => $view, 'operator' => $operator, 'admin' => $admin] as $role => $file) { + db_execute_prepared('DELETE FROM user_auth_realm WHERE user_id = ?', [$user]); + db_execute_prepared('INSERT INTO user_auth_realm (user_id, realm_id) VALUES (?, ?)', [$user, $realms[$file]]); + $result[$role] = $check(); + + foreach ([$view, $operator, $admin] as $page) { + $_SERVER['SCRIPT_NAME'] = '/plugins/pfs/' . $page; + $_SESSION = []; + api_plugin_load_realms(); + pfs_auth_alternate_realms(); + $deferred = $user_auth_realm_filenames[$page] === -1; + // Both cookie restore and Basic auth establish the user after the hook. + $_SESSION = ['sess_user_id' => $user]; + $current_user = db_fetch_row_prepared('SELECT * FROM user_auth WHERE id = ?', [$user]); + $allowed = pfs_page_allowed(); + $result['first_request'][$role][] = [$deferred, $allowed, $user_auth_realm_filenames[$page] > 0]; + } +} +// A valid realm never enables a disabled account after authentication restore. +db_execute_prepared("UPDATE user_auth SET enabled = '' WHERE id = ?", [$user]); +foreach ([$view, $operator, $admin] as $page) { + $_SERVER['SCRIPT_NAME'] = '/plugins/pfs/' . $page; + $_SESSION = []; + api_plugin_load_realms(); + pfs_auth_alternate_realms(); + $_SESSION = ['sess_user_id' => $user]; + $current_user = db_fetch_row_prepared('SELECT * FROM user_auth WHERE id = ?', [$user]); + $result['disabled_user'][] = pfs_page_allowed(); +} +db_execute_prepared("UPDATE user_auth SET enabled = 'on' WHERE id = ?", [$user]); +db_execute_prepared('DELETE FROM user_auth_realm WHERE user_id = ?', [$user]); +$result['revoked'] = $check(); +foreach ([$view, $operator, $admin] as $page) { + $_SERVER['SCRIPT_NAME'] = '/plugins/pfs/' . $page; + $_SESSION = []; + api_plugin_load_realms(); + pfs_auth_alternate_realms(); + $_SESSION = ['sess_user_id' => $user]; + $current_user = db_fetch_row_prepared('SELECT * FROM user_auth WHERE id = ?', [$user]); + $result['first_request']['revoked'][] = pfs_page_allowed(); +} +db_execute("INSERT INTO user_auth_group (name, enabled) VALUES ('pfs_role_test', 'on')"); +$group = (int) db_fetch_insert_id(); +db_execute_prepared('INSERT INTO user_auth_group_members (group_id, user_id) VALUES (?, ?)', [$group, $user]); +db_execute_prepared('INSERT INTO user_auth_group_realm (group_id, realm_id) VALUES (?, ?)', [$group, $realms[$operator]]); +$result['group_operator'] = $check(); +db_execute_prepared("UPDATE user_auth_group SET enabled = '' WHERE id = ?", [$group]); +$result['disabled_group'] = $check(); +db_execute_prepared('DELETE FROM user_auth_group_realm WHERE group_id = ?', [$group]); +db_execute_prepared('DELETE FROM user_auth_group_members WHERE group_id = ?', [$group]); +db_execute_prepared('DELETE FROM user_auth_group WHERE id = ?', [$group]); +db_execute_prepared('DELETE FROM user_auth WHERE id = ?', [$user]); +$_SESSION = []; diff --git a/tests/bin/php-guard-check.php b/tests/bin/php-guard-check.php index a5d11a8..48c8c05 100644 --- a/tests/bin/php-guard-check.php +++ b/tests/bin/php-guard-check.php @@ -109,7 +109,7 @@ function guard_call_shims() { if ($supported) { guard_expect($state['status'] == 1, 'install and enable succeed (status ' . $state['status'] . ')'); guard_expect($state['tables'] === 9, 'all nine plugin tables exist (' . $state['tables'] . ')'); - guard_expect($state['hooks'] >= 3 && $state['realms'] === 2, 'hooks and realms are registered'); + guard_expect($state['hooks'] >= 3 && $state['realms'] === 3, 'hooks and realms are registered'); } else { guard_expect($state['status'] == 2, 'plugin is left as needing configuration, not enabled (status ' . $state['status'] . ')'); guard_expect($state['tables'] === 0 && $state['hooks'] === 0 && $state['realms'] === 0, 'no tables, hooks, or realms were created'); diff --git a/tests/check_translations.py b/tests/check_translations.py new file mode 100644 index 0000000..512cbc2 --- /dev/null +++ b/tests/check_translations.py @@ -0,0 +1,167 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: 2026 Thomas Vincent +"""Check required catalogs and translated user guides without third-party packages.""" + +import ast +import gettext +import hashlib +import json +from pathlib import Path +import re +import sys +from urllib.parse import unquote, urlsplit + + +LOCALES = ("zh-CN", "hi-IN", "es-ES", "es-419", "ar-SA") +NAVIGATION = re.compile(r"\n.*?\n\n?", re.S) +HEADER = re.compile(r"") +TOKENS = re.compile(r"%(?:\d+\$)?[-+ 0#]*\d*(?:\.\d+)?[sdfuxXcoeEgGi]|%%|<[^>]*>") + + +def messages(path): + result = [] + for block in path.read_text(encoding="utf-8").split("\n\n"): + fields = {} + current = None + for line in block.splitlines(): + match = re.match(r'(msgid_plural|msgid) (".*")$', line) + if match: + current = match[1] + fields[current] = ast.literal_eval(match[2]) + elif line.startswith('"') and current: + fields[current] += ast.literal_eval(line) + else: + current = None + if fields.get("msgid"): + result.append(fields) + return result + + +def edges(text): + return (text[:len(text) - len(text.lstrip())], text[len(text.rstrip()):]) + + +def source_text(text): + return NAVIGATION.sub("", text) + + +def fenced_sections(text: str) -> tuple[list[tuple[str, str]], str]: + blocks = [] + prose = [] + fence = None + content = [] + language = "" + for line in text.splitlines(): + match = re.match(r"^[ \t]*(`{3,}|~{3,})(.*)$", line) + if fence is None and match: + fence, language = match[1], match[2].strip() + content = [] + prose.append("") + elif (fence is not None and match + and match[1][0] == fence[0] + and len(match[1]) >= len(fence) + and not match[2].strip()): + blocks.append((language, "\n".join(content))) + fence = None + elif fence is not None: + content.append(line) + else: + prose.append(line) + if fence is not None: + raise ValueError("unclosed code fence") + return blocks, "\n".join(prose) + + +def code_blocks(text): + blocks, _ = fenced_sections(text) + return [content for language, content in blocks if language != "mermaid"] + + +def links(text): + # Fenced examples can contain literal Markdown and URLs that are not links. + _, text = fenced_sections(text) + result = re.findall(r"\]\(]+)>?(?:\s+[\"'][^\n]*?[\"'])?\)", text) + result.extend(re.findall(r"(?:href|src|srcset)=[\"']([^\"']+)[\"']", text)) + return result + + +def heading_levels(text): + _, text = fenced_sections(text) + return [len(level) for level in re.findall(r"^(#{1,6})\s+", text, re.M)] + + +def validate(root): + failures = [] + manifest_path = root / "docs/i18n/manifest.json" + manifest = json.loads(manifest_path.read_text(encoding="utf-8")) + sources = manifest["sources"] + if manifest["locales"] != list(LOCALES): + failures.append("manifest locales must include both Spanish variants") + if "README.md" not in sources or len(sources) != len(set(sources)): + failures.append("manifest needs README.md and unique source paths") + required_sources = {"README.md", "docs/operator-guide.md", "docs/node-setup.md", "docs/alerting.md"} + if not required_sources.issubset(sources): + failures.append("manifest must include README, operator, node setup, and alerting guides") + template = messages(root / "locales/po/cacti.pot") + for locale in LOCALES: + for path in (root / "locales/po" / (locale + ".po"), root / "locales/LC_MESSAGES" / (locale + ".mo")): + if not path.is_file(): + failures.append("missing catalog: " + str(path.relative_to(root))) + mo = root / "locales/LC_MESSAGES" / (locale + ".mo") + if mo.is_file(): + with mo.open("rb") as stream: + catalog = gettext.GNUTranslations(stream) + if catalog.info().get("language") != locale: + failures.append("wrong compiled language header: " + locale) + for entry in template: + original = entry["msgid"] + values = [catalog.gettext(original)] + if "msgid_plural" in entry: + values = [catalog.ngettext(original, entry["msgid_plural"], n) for n in (0, 1, 2, 3, 11, 100)] + for value in values: + if sorted(TOKENS.findall(original)) != sorted(TOKENS.findall(value)) or edges(original) != edges(value): + failures.append("placeholder, markup or whitespace mismatch: " + locale + ": " + original) + for source in sources: + original = root / source + translated = root / "docs/i18n" / locale / source + label = str(translated.relative_to(root)) + if not original.is_file() or not translated.is_file(): + failures.append("missing source or translation: " + label) + continue + english = source_text(original.read_text(encoding="utf-8")) + text = translated.read_text(encoding="utf-8") + header = HEADER.search(text) + digest = hashlib.sha256(english.encode()).hexdigest() + if header is None or header[1] != source or header[2] != digest: + failures.append("source changed; review and refresh translation: " + label) + body = re.sub(r'^\n', "", text, flags=re.M) + if source_text(HEADER.sub("", body)).strip() == english.strip(): + failures.append("translation is an English copy: " + label) + if heading_levels(english) != heading_levels(text): + failures.append("heading structure differs from source: " + label) + try: + if code_blocks(english) != code_blocks(text): + failures.append("code examples differ from source: " + label) + except ValueError as error: + failures.append(str(error) + ": " + label) + for link in links(text): + parts = urlsplit(link) + if parts.scheme or parts.netloc or not parts.path or parts.path.startswith("/"): + continue + target = (translated.parent / unquote(parts.path)).resolve() + if not target.is_relative_to(root.resolve()) or not target.exists(): + failures.append("broken local link: " + label + " -> " + link) + if failures: + print("\n".join(failures), file=sys.stderr) + return 1 + print(f"Verified {len(LOCALES)} locale catalogs and {len(sources) * len(LOCALES)} translated guides") + return 0 + + +if __name__ == "__main__": + try: + sys.exit(validate(Path(__file__).resolve().parents[1])) + except (OSError, ValueError, KeyError) as error: + print("Translation validation failed: " + str(error), file=sys.stderr) + sys.exit(1)