Monarch Configuration Tips and Tricks to Manage Nagios Configuration Files العاهل تكوين نصائح والخدع لإدارة ملفات تكوين Nagios
Posted by أرفق alex أليكس in في Insights رؤى at 7:03 PM في الساعة 7:03As you add services, contacts, contact groups, commands, and devices to Nagios the bulk editing begins to become very tedious. كما يمكنك إضافة الخدمات ، والاتصالات ، ومجموعات الاتصال ، والأوامر ، وأجهزة لNagios تحرير الجزء الأكبر يبدأ لتصبح مملة جدا. Monarch is a great tool to manage Nagios configuration(.cfg) files. To install Monarch follow the instructions provided in the README.txt that comes with the product. الملك عبد الله هو أداة عظيمة لإدارة Nagios التكوين (. س ف ج) ملفات لتثبيت العاهل اتباع التعليمات المنصوص عليها في Readme.txt الذي يأتي مع المنتج. Below I provide instructions to assist in that installation along with some tips and tricks that I learned along the way. أدناه الأول تقديم الإرشادات للمساعدة في هذا التثبيت جنبا إلى جنب مع بعض النصائح والحيل التي تعلمت على طول الطريق.
**UPDATE** I realized when reading back through this article that I had not included a download link for Monarch so click ** تحديث ** أدركت عندما يعود من خلال قراءة هذه المقالة التي لم أكن قد تضمنت وصلة لتحميل العاهل حتى فوق here هنا to download Monarch to manage your Nagios configuration files. لتنزيل خادم الحرمين الشريفين لإدارة حسابك Nagios ملفات التكوين.
How to Install Monarch كيفية تثبيت خادم الحرمين الشريفين
- Install Perl Modules: Install the following perl modules via the CPAN shell: CGI-Session, Class-Accessor, XML-LibXML-Common, XML-NamespaceSupport, XML-SAX, XML-LibXML-1.58, CGI, DBI, DBD-mysql, File::Copy, CGI-Ajax, Data-FormValidator, JavaScript-DataFormValidator, Carp, IO-Socket, Time-Local, and URI-Escape.First start CPAN. تثبيت وحدات بيرل : تثبيت الوحدات التالية بيرل عبر قذيفة CPAN : المجموعة الاستشارية لاندونيسيا الدورة ، من الدرجة الاولى ، الموصل ، إكس إم LibXML - عام ، إكس إم NamespaceSupport ، إكس إم ساكس ، إكس إم LibXML - 1.58 ، المجموعة الاستشارية لاندونيسيا ، ديسيبل ، DBD - الخلية ، ملف : : نسخ ، المجموعة الاستشارية لاندونيسيا - اياكس ، البيانات FormValidator ، وجافا سكريبت ، DataFormValidator ، شبوط ، الإعلام والتوعية المقبس وتايم ومحلي ، وأوري - Escape.First بدء CPAN.
[root@server ~]# perl -MCPAN -e shell [@ الجذر الخادم ~] # بيرل - MCPAN - ه قذيفةNow install the various perl modules. الآن تثبيت مختلف الوحدات بيرل.
cpan> install CGI::Session cpan> تثبيت المجموعة الاستشارية لاندونيسيا : : الدورة cpan> install Class::Accessor cpan> تثبيت الدرجة الاولى : : الموصل cpan> install XML::LibXML::Common cpan> تثبيت XML : : LibXML : : عام cpan> install XML::NamespaceSupport cpan> تثبيت XML : : NamespaceSupport cpan> install XML::SAX cpan> تثبيت XML : : ساكس cpan> install P/PH/PHISH/XML-LibXML-1.58.tar.gz cpan> تثبيت P/PH/PHISH/XML-LibXML-1.58.tar.gz cpan> install CGI cpan> تثبيت المجموعة الاستشارية لاندونيسيا cpan> install DBI cpan> تثبيت ديسيبل cpan> install DBD::mysql cpan> تثبيت DBD : : الخلية cpan> install File::Copy cpan> تثبيت ملف : : نسخ cpan> install CGI::Ajax cpan> تثبيت المجموعة الاستشارية لاندونيسيا : : اياكس cpan> install Data::FormValidator cpan> تثبيت البيانات : : FormValidator cpan> install JavaScript::DataFormValidator cpan> تركيب جافا سكريبت : : DataFormValidator cpan> install Carp cpan> تثبيت شبوط cpan> install IO::Socket cpan> تثبيت الإعلام والتوعية : : مقبس cpan> install Time::Local cpan> تثبيت الوقت : : محلي cpan> install URI::Escape cpan> تثبيت أوري : : الهروب
- Create Database: Now create the mysql database using the below syntax. إنشاء قاعدة بيانات : والآن إنشاء قاعدة بيانات الخلية باستخدام بناء الجملة أدناه.
mysql>create databasse monarch; ك> إنشاء العاهل databasse ؛ - Monarch Install Script: Now run the monarch_setup.pl script which will create all of the necessary database tables for Monarch. العاهل تثبيت سيناريو : والآن قم بتشغيل البرنامج النصي monarch_setup.pl التي سوف تخلق كل من جداول قاعدة البيانات اللازمة لخادم الحرمين الشريفين. Note that this will drop any existing tables in the monarch database and recreate the necessary tables. نلاحظ أن هذا سوف تنخفض أي الجداول الموجودة في قاعدة الملك عبد الله وإعادة إنشاء الجداول اللازمة.
[root@ali monarch-2.5.0]#perl monarch_setup.pl [@ الجذر علي العاهل - 2.5.0] # بيرل monarch_setup.pl - Verify Web Server Permissions: Now verify that the web server is a member of the nagios group. تحقق من أذونات ملقم ويب : والآن تحقق من أن خادم الويب هو عضو في مجموعة nagios. If you are using apache and it runs under the apache user then you would see a line similar to the below in your /etc/groups file. إذا كنت تستخدم اباتشي وتشغيله تحت المستخدم اباتشي فإنك سوف تشاهد خط مشابهة إلى أدناه في ك / الخ / المجموعات الملف.
nagios:x:20002:apache nagios : س : 20002 : اباتشي - Verify .cfg Permissions: Verify that the nagios configuration files have write access for the group level and that the parent folders are searchable. تحقق. أذونات س ف ج : تحقق من أن ملفات التكوين nagios الوصول للكتابة على مستوى المجموعة وأن المجلدات الأصل قابلة للبحث. Locate your nagios .cfg files and issue the following command. تحديد موقع nagios. الملفات س ف ج وإصدار الأمر التالي.
chmod 664 *.cfg شمود 664 س ف ج *.Now make sure the parent folders all have permissions like the following: drwxrwxr-x الآن تأكد من المجلدات الأصل جميع الأذونات كما يلي : drwxrwxr - خ
- Open Monarch URL: Now open a browser and enter the following URL: http://userdomain.com/cgi-bin/monarch.cgi فتح العاهل عنوان : والآن فتح المتصفح والدخول على العنوان التالي : http://userdomain.com/cgi-bin/monarch.cgi
- Login: Use the following credentials to login to monarch: الدخول : استخدام وثائق التفويض التالي للدخول الى الملك عبد الله :
User: super_user مستخدم : super_user
Password: password كلمة السر : كلمة السر
Make sure to change the password for the super_user immediately or add a new super user with a different login and password. تأكد من تغيير كلمة المرور لsuper_user فورا أو إضافة مستخدم جديد السوبر مع مختلف الدخول وكلمة المرور. Then delete the super_user account once you have verified the other account to be functional. ثم حذف الحساب super_user بمجرد التحقق من حساب الأخرى لتكون وظيفية. - Set nagios.cfg Folder: Now go to Control >> Setup to set the nagios.cfg folder to the proper directory. تعيين مجلد nagios.cfg : الآن اذهب إلى التحكم> الإعداد لتعيين المجلد nagios.cfg إلى الدليل الصحيح.
- Set CGI Configurations: Either load an existing configuration or start a new setup by following the below instructions.A. تعيين المجموعة الاستشارية لاندونيسيا تكوينات : إما تحميل تكوين موجود أو بدء الإعداد الجديد باتباع instructions.A أدناه. Load Existing: Visit Control >> Nagios CGI Configuration and choose “Load from File”B. تحميل القائمة : زر التحكم> Nagios تكوين المجموعة الاستشارية لاندونيسيا واختر "تحميل من ملف" B. Start New: Visit Control >> Nagios CGI Configuration and choose “Set Defaults” بداية جديدة : زر التحكم> Nagios تكوين المجموعة الاستشارية لاندونيسيا واختيار "تعيين الافتراضيات"
- Set Nagios Configurations: Either load an existing configuration or start a new setup by following the below instructions.A. مجموعة Nagios تكوينات : إما تحميل تكوين موجود أو بدء الإعداد الجديد باتباع instructions.A أدناه. Load Existing: Visit Control >> Nagios Main Configuration and choose “Load from File”B. تحميل القائمة : زر التحكم> Nagios الرئيسية لتكوين واختيار "تحميل من ملف" B. Start New: Visit Control >> Nagios Main Configuration and choose “Set Defaults” بداية جديدة : زر التحكم> Nagios الرئيسية لتكوين واختيار "تعيين الافتراضيات"
- Load Files or Use Samples: Now you need to import your existing nagios templates by visiting Control and clicking on Load or copy the sample configuration files provided with Monarch into your nagios cfg folder and then click on Control followed by clicking on Load. تحميل الملفات أو استخدام العينات : والآن أنت بحاجة لاستيراد nagios القوالب الموجودة من خلال زيارة والتحكم بالضغط على تحميل أو نسخ ملفات التكوين العينة المقدمة مع خادم الحرمين الشريفين إلى حسابك nagios س ف ج المجلد ، ثم انقر على التحكم تليها بالضغط على السعة.
That is the basic setup to get going. هذا هو الإعداد الأساسي للحصول على الذهاب. There are a couple of things I noticed along the way that caused issues for me. هناك بضعة أشياء لاحظت على طول الطريق التي تسببت في القضايا بالنسبة لي. The main thing being if you are loading in an existing Nagios setup and have any spaces in hostnames, contacts, services, check_commands, etc. then you will have issues importing that data in. Make sure to remove all spaces before attempting to import the configuration files into Monarch and it will save you a huge headache ahead of time. الشيء الرئيسي هو إذا كنت تقوم بتحميل في القائمة Nagios والإعداد لديه أية مسافات في أسماء المضيفين ، والاتصالات ، والخدمات ، check_commands ، وما إلى ذلك فإنك سوف يكون لديك مشاكل استيراد البيانات التي فيها تأكد من إزالة كافة المسافات قبل محاولة استيراد التكوين الملفات إلى خادم الحرمين الشريفين وسيوفر لك صداعا كبيرا في وقت مبكر.
Example Services with spaces below. المثال خدمات بمسافات أدناه.
# The following service will monitor the the number of currently logged in users on the remote host. # وفيما يلي خدمة سيرصد لعدد من المستخدمين في تسجيل حاليا على المضيف البعيد. define service{ تعريف الخدمة ( use generic-service استخدام الخدمة العامة host_name server1, server2, server3 host_name server1 ، server2 ، server3 service_description CURRENT USERS المستخدمين الحاليين service_description check_command check_nrpe!check_users check_command check_nrpe! check_users } ) # The following service will monitor the total number of processes on the remote host. # وفيما يلي الخدمة سوف يرصد العدد الإجمالي للعمليات على المضيف البعيد. define service{ تعريف الخدمة ( use generic-service استخدام الخدمة العامة host_name server1, server2, server3 host_name server1 ، server2 ، server3 service_description TOTAL PROCESSES service_description العمليات المجموع check_command check_nrpe!check_total_procs check_command check_nrpe! check_total_procs } )
Notice the TOTAL PROCESSES and CURRENT USERS lines. لاحظت مجموع العمليات وخطوط المستخدمين الحاليين. You should convert all of these before importing to total_processes and current_users as an example. يجب عليك تحويل جميع هذه قبل استيراد لtotal_processes وcurrent_users كمثال على ذلك. Again this will save you a lot of trouble during the import. مرة أخرى هذا سيوفر لك الكثير من المتاعب أثناء عملية الاستيراد.
- Easy Management of Nagios Configuration Files with Web Based GUI Monarch من السهل إدارة Nagios تكوين الملفات مع الشبكة العالمية القائمة على واجهة المستخدم الرسومية مونارك Nagios is a great solution for monitoring hosts, networks, and... Nagios هو حل كبير لرصد المضيفين ، والشبكات ، و...
- NRPE Nagios Plugin To Check The Number Of Files In A Directory NRPE Nagios المساعد للتحقق عدد من الملفات في دليل We have various scripts on a server that process files... لدينا مخطوطات مختلفة على خادم الملفات عملية...
- Use Nagios To Check Process Size And Provide Alerts Based on Process Megabyte Size استخدام Nagios إلى تدقيق حجم العملية وتوفير تنبيهات واستنادا إلى عملية الميغابايت الحجم Nagios is an awesome open source application that provides a... Nagios هو رهيبة التطبيقات المفتوحة المصدر التي توفر a...
Tags: السمات : apache اباتشي , ، cfg س ف ج , ، configuration التكوين , ، CPAN CPAN , ، modules وحدات , ، monarch العاهل , ، monitoring رصد , ، mysql ماي , ، nagios nagios , ، perl بيرل
























