$Id: README 52 2015-06-30 12:03:13Z abalama $ App::MonM v1.05 and later This document written in cp-866 (OEM) charset ============================================= ������� � ������� ----------------- App::MonM - ����� �����㬥�⮢ ��� ���⮣� �����ਭ�� ࠡ��� �᭮���� WEB-�ࢨᮢ (ᠩ⮢, ��� ������, ����䥩ᮢ � �.�.). ����������� ----------- - ��ઠ ����㯭��� ���-ᠩ⮢ (checkit http) - ��ઠ ࠡ��ᯮᮡ���� ࠧ����� ��� ������ (checkit dbi) - ��ઠ ���譨� ���稪�� ���।�⢮� �믮������ ��⥬��� ������ (checkit command) - ��ઠ ����㯭��� �ࢥ SMTP, POP3, FTP, SSH � ��. (checkers) - �믮������ �⫠����� ����ᮢ SQL (dbi) - �믮������ �⫠����� ����ᮢ HTTP (http) - ����䥩� ��� SMS ���ନ��� (sendalertsms) - ��堭��� ᡮ� � �࠭���� ������᪨� ������ �� ࠧ����� ���筨��� (alertgrid) - ���ᮢ�� (�������) ��䨪�� �� ����� ᮡ࠭�� � ������� AlertGrid (rrd) - ������ ����ன�� ��⥬ ���⮣� ।������� ���䨣��樮���� 䠩��� - ��⠭���� ��� �।�⢠�� CPAN ��� � ��筮� ०��� �१ make install - ����������� ��⥣����� ��� � WEB ����䥩�� ����������� ----------- ��। ��砫�� ��⠭����, ��� ����室��� ����� ����稥 ����� ����⮢, ��⠭�������� � ��襩 ��⥬� ��� �㤥� "ࠡ����" App::MonM: - gcc ������ ���ᨨ - perl v5.10 ��� ��� (४��������� �� ���� v5.12) - libwww (p5-libwww / perl-libwww) - libnet ������ �⮣�, ������� ���������� App::MonM �ॡ��� ����稥 WEB �ࢥ� Apache 2.2 ��� ���. ��ࢥ� ������ ���� ����� �� �믮������ CGI (perl) �ਯ⮢. ����� ������ ���� ��⠭������ ������: - Net-SNMP (net-snmp + net-snmp-perl) - RRDtool (rrdtool + rrdtool-perl) ��������� --------- ��⠭���� �믮������ ���� ���ﬨ. ���� - ��⮬�⨧�����; ��ன - ��筮�. � ��⮬�⨧������ ०��� ��� ��⠭���� �����筮 �믮����� �������: # cpan install App::MonM ��� (��� ActivePerl): # ppm install App-MonM � ��筮� ०��� ��� ���ॡ���� �믮����� ���騩 ����� ����権: - ������ ����ਡ�⨢ � CPAN ��� ��樠��� ५�� � ᠩ� SourceForge: https://metacpan.org/pod/App::MonM http://search.cpan.org/~abalama/ https://sourceforge.net/projects/app-monm/ - �����娢���� ����祭�� ��娢, � ��३� � �����祭��� ����� � ������� ���᮫� - ��室��� � �����祭��� ����� �믮����� ������⥫쭮 ���騥 �������: perl Makefile.PL make make test make install � ����� ��⠭���� ��⥬� �।����� ��⠭����� ����室��� ���㫨 (������), ����ᨬ�� ���㫥� �� ⠪ ����� � ������ �� ���� 㦥 ��⠭������ �� ��襩 ��⥬�. ������������� ------------- ����� ���樠����樨 ��⨢���� ࠡ��� �ਫ������ monm (����� ���� monm). �� �ਫ������ ���� ����䥩ᮬ ��⥬��� �����窨 � �।��⠢��� ����� � �㭪樮����� ����������� ����� App::MonM. � ����� ���樠����樨 ���� ᮧ���� ����室��� ��४�ਨ � ���䨣��樮��� 䠩��. ��� ���樠����樨 ��� �믮����� ������ �������: # monm config � �� ������ ��⠭�������� ���䨣��樮��� 䠩�� � � ��⠫��, � ��� �������� ���樠������ � ���祬 -c DIRECTORY/monm.conf: # monm -c /my/config/files/monm.conf config ������ �������� "ࠧ���" ���䨣��樮��� 䠩�� � ��⠫��� /my/config/files ������������ ------------ ����讥 �������� ��� 㤥���� ���䨣��樨. ������ �ࠢ��쭮� �������� �ਫ������ ��࠭���� ���४��� ࠡ��� �ᥣ� �ਫ������. � ����� ���樠����樨 ��� �� ������� �� ��࠭� ���᮫� ����, �� ���� �ᯮ������ ���䨣��樮��� 䠩��. ��� ���䨣��樮��� ��⠫�� ᮤ�ন� �� 㬮�砭�� 䠩��: conf.d/alertgrid.conf.sample conf.d/checkit-foo.conf conf.d/checkit-foo.conf.sample conf.d/dbi-foo.conf.sample conf.d/http-foo.conf.sample conf.d/rrd.conf.sample extra/sendmail.conf extra/checkit.conf monm.conf ������ ���䨣��樮��� 䠩��� ���� 䠩� monm.conf. �� ᮤ�ন� �������� ��।������ � ��।���� ����� �������⥫�� 䠩�� ���� ���⠭� � �ᯮ�짮������. ���� extra/sendmail.conf ᮤ�ন� ��।������ ��� ��ࠢ�� �������� ����� �� 㬮�砭��. ���� extra/checkit.conf �㦨� ��� ��।������ �ᯮ��㥬�� � �� ࠡ�� ��ࠡ��稪�� checkit. ��⠫��� conf.d ᮤ�ন� 䠩�� ����뢠�騥 ᥪ樨 ��� ࠡ��� ��� ��ࠡ��稪��, ���ਬ�� dbi, checkit, http monm.conf ~~~~~~~~~~~~ ��� 㦥 㯮�������� ���, 䠩� monm.conf ᮤ�ন� �������� ��।������. LogEnable on LogEnable off ��४⨢� �������� ������� ��� �몫���� �������� ����ᮢ monm. �� 㬮�砭�� - off LogLevel warning ��४⨢� ��।���� ���� �⫠���. ������� ���騩 ����� ���� �⫠���: debug, info, notice, warning, error, crit, alert, emerg, fatal, except. �� 㬮�砭�� �ᯮ������ ���祭�� debug ��� �⫠����� ���ଠ�� monm �����뢠�� � 䠩� monm.log ��⥬���� ��⠫��� ��ୠ���� 䠩���, ���ਬ��: /var/log/monm.log � ��砥 ����᪠ �ணࠬ�� monm � ��ࠬ�� -l ������ 䠩�� monm.log �㤥� �����뢠���� 䠩� ��⥬���� ���� - monm_debug.log. ����� 䠩� �㦥� ��� ��⠫쭮� �⫠��� ࠡ��� ����ᨬ�� ��������⮢ App::MonM. extra/sendmail.conf ~~~~~~~~~~~~~~~~~~~ ���� ᮤ�ন� ���� ��।������ <SendMail>...</SendMail> � ��।������� ��� ��ࠢ�� ���� �� �������� ����. �������� ��४⨢ ᮮ⢥������ ���� ��⮪��� SMTP, �� �᪫�祭��� ����� �����: Sendmail /usr/sbin/sendmail Flags -t ��४⨢� Sendmail ��।���� ����ୠ⨢��� SMTP �ਫ������, ��ࠢ��饥 ���쬮. ����� �ਫ������ ��室�� � ���箬 -t, ��।�������� ��४⨢��� Flags SMTP 192.168.0.1 SMTPuser user SMTPpass password ����� ��४⨢� ��।����� ��ࠬ���� ᮥ������� � SMTP �ࢥ ��� ��ࠢ�� ᮮ�饭��. ��ࠬ��� SMTPuser � SMTPpass ����易⥫��. ������ ������ ------------- �� �ᯥ譮� ࠡ��� �� ��⠭����, ���樠����樨 � ����ன�� - ���室�� � ��ࢮ�� ������ �ணࠬ�� monm. ��� ��筥��� ᨭ⠪�� �ᥣ�� ����� ��ᯮ�짮������ ��������: # monm -h ��騩 ᨭ⠪�� ������� monm ⠪��: # monm [OPTIONS] [COMMANDS [ARGS]] ������� �� ���祢�� ��権 �������: -D DATADIR ������ ���� (����) ��।���� �������� �����, � ������ ���� ��������� �६���� 䠩��, ����室��� ��� ࠡ���. �� 㬮�砭�� �ᯮ������ ��⥬�� ��⠫�� �६����� 䠩���. -c CONFFILE --config=CONFFILE ���� ���⠢��� �ணࠬ�� �ᯮ�짮���� � ����⢥ ���䨣��樮����� 䠩�� CONFFILE. �� 㬮�砭�� �ᯮ������ ��⥬�� ���� � 䠩�� monm.conf. -v ���� �������� ������ �� ��࠭� १���� ࠡ��� �ணࠬ�� mbutiny. ��� ����� ��⠫쭮� ���ଠ樨 ����� ��ᯮ�짮������ �������⥫�� ���祬 -d. ������� � ��������� ------------------- �ணࠬ�� monm �����ন���� ���騥 ������� test ~~~~ �������� ��� �᭮���� ��������⮢ �ணࠬ��. �� ������� �����頥��� ����� ������, ⠪�� ���: ��६���� ���㦥���, ���䨣��樮��� �����, ᯨ᮪ ������祭��� ��४� ������⥪ ������ ������� �� �ॡ�� ������� ��㬥�⮢ void ~~~~ ���⮩ ���⥪��, �ணࠬ�� ����᪠���� � ��祣� �� ������. �����頥� "���⮩" �⢥� ������ ������� �� �ॡ�� ������� ��㬥�⮢ dbi ~~~ �������� ࠡ��� ࠧ����� ��� ������ �ᯮ���� ����䥩� DBI � �믮������ 㪠������ �������. ���� �ਬ��� �ᯮ�짮����� monm dbi -d -F text -s TEST -u USER -p PASSWORD --sql="select sysdate from dual" ��� �ਬ�� ����������� � ��� ࠡ�⠥� ���⮩ ����� (select sysdate from dual) � �� Oracle. ��� ᮥ������� �ᯮ������� ����� SID (���� -s), ����� � ��� (���� -u � -p). echo select sysdate from dual | monm -d --stdin -F text -s TEST -u USER -p PASSWORD ��� �ਬ�� �������祭 �।��騬� �� �᪫�祭��� ⮣� �� � ����⢥ SQL �ᯮ������ �� ��㬥�� ��������� ��ப� � �⠭����� ����. monm dbi -d -F text -s TEST -u USER -p PASSWORD ��� �ਬ�� �������祭 ��ࢮ��, �� � ����⢥ SQL ����� ����㯠�� ����� �� 㬮�砭��. ��� �� Oracle ����� �ᯮ������ ���: SELECT SYSDATE FROM DUAL monm dbi -d -F xml -s TEST -u USER -p PASSWORD -o oracle.xml ��� ����� �������祭 �।��饬� ⮫쪮 १���⨢�� XML ���㬥�� �����뢠���� � 䠩�. � ������� ���� -d � -F � १���⨢�� XML ���㬥�� �㤥� �뢥��� � �⠭����� �뢮�, � ��⭮��, �� ��࠭. �ਬ� �⠭���⭮�� XML �. ࠧ��� "API" monm dbi -d -F yml --sid=TEST -u USER -p PASSWORD -T 10 ����� �ਬ�� ����������� ࠡ��� ����� � ����⢥ �뢮������ �ଠ� ������ �ᯮ������ ���� YAML � ��⠭����� ⠩���� �� ����⨥ ᮥ������� � �� � �믮������ ����� �� 㬮�砭��. monm dbi -d foo �ਬ�� �᭮�뢠���� �� ��⠮�।������ foo. ��⮯।������ foo ����뢠���� ᥪ樥� ���䨣��権 <DBI foo>. ���ᠭ�� ����� �. � ���䨣��樮���� 䠩�� dbi-foo.conf.sample. ����� ���室 "�����砥�" ࠡ��� � ��������� ��ப�� �뭮�� ����設�⢮ ����室���� ��㬥�⮢ � ���䨣��樮��� 䠩�. monm dbi -dF text -s TEST -u USER -p PASSWORD --sql="select rownum from dual connect by level <= 5" �ਬ�� �������騩 㢨���� ������ ⠡���� �����頥��� Oracle monm dbi -d -n DBI:mysql:database=MYBASE;host=www.example.com -u LOGIN -p PASSWORD �������� ࠡ��� 㪠������ ���� ������ � �믮������ 㪠������ �������. ������ ������� �ࠪ��᪨ ��������� �����筠 �।��騬 �� �᪫�祭��� ⮣� �� ���� -s (--sid) ������� ���箬 -n (--dsn) �㤠 ��� ��।����� DSN � �� ����. http ~~~~ �������� ࠡ��� URL �����. ����� ������� �᭮�뢠���� �� �맮�� LWP � ������ �롮 ��権, ᯨ᮪ ������ �ਢ���� � ᥪ樨 ���䨣��樨 <HTTP foo>. ���ᠭ�� ����� �. � ���䨣��樮���� 䠩�� http-foo.conf.sample. ����� ���室 "�����砥�" ࠡ��� � ��������� ��ப�� �뭮�� ����設�⢮ ����室���� ��㬥�⮢ � ���䨣��樮��� 䠩�. ����� �� �⮨� �ਢ��� ���쪮 ⨯���� �ਬ� ࠡ��� � ��������� ��ப��. monm http -d -q http://www.example.com ��� �ਬ�� �������� ������� ���ଠ�� � ����訢����� ���⥭� � �뢥�� �� �� ��࠭. monm http -q http://www.example.com ��� �ਬ�� �����祭 �।��饬�, �� �� ��࠭ �뢮����� ���ଠ�� � �ଠ� TXT monm http -q http://www.example.com -F xml ��� �ਬ�� �������� 㢨���� �� ��࠭� � ᠬ� ᮤ�ন��� ����� http://www.example.com � ᥪ樨 XML <result></result> monm http -q http://www.example.com -u LOGIN -p PASSWORD monm http -q http://LOGIN:PASSWORD@www.example.com �ਬ��� ��������� ������� ����� � ������ �ॡ��饬� ���ਧ��� HTTP monm http -q http://www.example.com -m POST --request="foo=1&bar=2" ��� �ਬ�� ����������� ��� ����� ��।����� ����� ��⮤�� POST monm http -q http://www.example.com -f file.txt -T 20 ��� �ਬ�� �����뢠�� ��� ����� ������� "᪠祭��" ���⥭� � 䠩� file.txt. ������ �⮣� ���� -T ��।���� ⠩���� ����� echo foo=123 | monm http --stdin -m POST -q http://www.example.com �ਬ�� ����������� ��� ��।��� ����� ��� POST ����� � ������� �⠭���⭮�� �室���� ������ monm http foo �ਬ�� ����������� �ᯮ�짮����� ᥪ樨 ���䨣��樨 <HTTP foo> � ����⢥ ���筨�� ������ ��� �믮������ ����ᮢ. ������ �⮣� � ᥪ�� ����� ��������� ����� ����室��� ��� �����, �㪥ᮢ � �������⥫��� ����������. checkit ~~~~~~~ �� ���� �� ������ ��ࠡ��稪�� ��⥬�, �� � ⮦� �६� ���� �� ᠬ�� ������ ��� ��������� ���짮��⥫��. ��ࠡ��稪 �������� �� ᯨ�� ���稪�� � ����� ��. ���稪� �ᥣ�� �������� ����� ���� OK ���� ERROR � ��祣� ��譥��. � ����⢥ ���筨�� ������ ����� ���� ���� ������ ��� १���� �� ���⮩ ����� HTTP. ������ �⮣� �����ন������ ���稪� �믮����騥 SHELL �������. monm checkit �ਬ�� �������� �믮����� ࠡ��� ��� �ᥬ� �������묨 ���稪���. monm checkit www.example.com ��� �� �ਬ�� �����뢠�� ��� ����� ��ࠡ���� ⮫쪮 ���� ���稪 � ������ www.example.com �� ��������� ����� ��� ���稪� �ࠡ��뢠�� �ਣ����, ���ਬ��, ��ࠢ�� ᮮ�饭�� E-Mail ��� SMS. ����� ���� ����������� �믮����� ���� ������� � ⥪�饩 ��⥬� (⠬, ��� ��⠭����� ����� App::MonM). ���� �ਬ�� ������騩 ᠬ� ���⮩ ���稪 � �ਣ����: <Checkit "foo"> Enable yes URL http://www.example.com Target code IsTrue 200 <Triggers> emailalert foo@example.com emailalert bar@example.com emailalert baz@example.com smsalert 11231230001 smsalert 11231230002 smsalert 11231230003 # ���᮪ ������, ����� ���� �믮����� �� �ࠡ��뢠��� �ਣ��� # ������� ����⠭����: # [SUBJECT] -- ���� # [MESSAGE] -- ����饭�� #command "mycommand1 "[SUBJECT]" "[MESSAGE]"" #command "mycommand2 "[MESSAGE]"" #command "mycommand3" </Triggers> </Checkit> alertgrid ~~~~~~~~~~ ��ࠡ��稪 ᮧ��� ��� �।��⠢����� ���������� ᡮ� ������᪨� ������ ���ﭨ� ࠡ��� �ᥢ��������� ����㤮����� � �ࢨᮢ. ����� ᮡ࠭�� �� ���筨��� ��࠭����� � ���� ⠡��� � ������������ �� �⥭�� ��� �����饩 ��ࠡ�⪨ ��� �⮡ࠦ���� � ���� �⮣���� ⠡����. ��ࠡ��稪 alertgrid � �離� � rrd ���ᯥ稢��� �⫨�� ᯮᮡ ����來��� �⮡ࠦ���� ᮡ࠭��� ������ � ���� ��䨪��. ����� ����� � �離� alertgrid � rrd �. � ࠧ���� ALERTGRID AND RRD. ���ᬮ�ਬ ࠡ��� �᭮���� ����権 AlertGrid �� �ਬ���. monm alertgrid init ������� �������� ���樠������� ���� ������ alertgrid. monm alertgrid agent ������� �������� �ன��� �� �ᥬ ���稪�� � ������ ����� ��࠭�� �� � ���� ������ alertgrid monm alertgrid export -F xml monm alertgrid export -F xml -o index.xml ������� �������� �믮����� ��ᯮ�� ������ � ���� XML ���㬥�� �� �⠭����� �뢮�. ����� ��� ���� ������� �뢮��� ����� � 䠩� test.xml. ������ �������, �� �� ���⠢����� ��ࠬ��� ���䨣��樮����� 䠩�� alertgrid.conf - AlertGrid/Agent/TransferType � ���祭�� ࠢ��� http ����� ��ᯮ�� ���� ��������� �� 㪠������� URI ᥪ樨 AlertGrid/Agent/HTTP. monm alertgrid snapshot monm alertgrid snapshot -o index.txt ����� ������� ������� export �� �᪫�祭��� �ଠ� �뢮��. ������� �뢮������ ���㬥�� �㤥� �������� ��� �����樨 HTML ���㬥�⮢ ��� ⥪�⮢�� ���㬥�⮢. monm alertgrid config ������� �������� ������� �᭮��� ���䨣��樮��� ����� alertGrid �� �����쭮� ��設�. ������ ������� ������� �ᯮ�짮���� ��� �離� � ��㣨�� �ਫ�����ﬨ rrd ~~~ ��ࠡ��稪 �������� �믮����� ������� ��䨪�� �� ������ ᮡ࠭�� � ������� AlertGrid (�. ���). ����� ����� � �離� alertgrid � rrd �. � ࠧ���� ALERTGRID AND RRD. ���ᬮ�ਬ ࠡ��� �᭮���� ����権 RRD �� �ਬ���. monm rrd init ������� �������� ���樠������� ���� RRDtool monm alertgrid export -F xml | monm rrd update -I ������� �������� ᤥ���� ���㧪� AlertGrid � ��।��� ����� ��堭���� RRD ��� �����饣� ���������� ��� RRD. monm alertgrid export -F xml -o alertgrid.xml monm rrd update -i alertgrid.xml ��������� �ਬ��, �⫨砥 ��⮨� � ⮬ �� �ᯮ������ ������� ���㬥�� alertgrid.xml monm rrd graph ������� �������� ���ᮢ��� ����� �� ��䨪�� - ����ந�� �� monm rrd index ������� �������� ��ନ��� ������� 䠩� ��� �⮡ࠦ���� �������� ��䨪�� � ��㧥� ALERTGRID AND RRD ----------------- ��ࠡ��稪 alertgrid � �離� � rrd ��������� ��ந�� ��䨪� �� �����, ����祭�� �� ࠧ����� ���筨��� (���稪��). ����� ������� ��䨪�� ����� � ᡮ�� ������, �� ���������� � �� �⮡ࠦ���� � ���� ��䨪��. �� ������ ����� ��।������� ������/�ࢥ� ��⥬�, ��� ���� ��������� �믮����� �㭪�� ����⮢, ��㣨� �믮����� �㭪�� ���筨��� ������, � ���� - �㭪�� �ࢥ�. ���ᬮ�ਬ �ਬ�� +-----+ | PC2 | +--+--+ +-----+ | +-----+ | PC1 +--+ | +--+ PC3 | +-----+ | | | +-----+ | | | inet ~~~~~~~ | | | +--+-+-+--+ | AGENT_1 | +----+----+ +---------+ | +------+ AGENT_2 | | | +---------+ inet ~~~~~ | | +---+-+--+ | SERVER | +---+----+ ���� �奬� ࠡ���. ��ࢥ� (SERVER) �ਭ����� ᮡ࠭�� ����� �� ����⮢ (AGENT_1 � AGENT_2). AGENT_1 ᮡ�ࠥ� ����� �� ᥡ� ᠬ��� (� �� �ॡ����) � �� �������-���筨��� (PC1, PC2 � PC3). AGENT_2 ᮡ�ࠥ� ����� ⮫쪮 �� ᠬ��� ᥡ�. �� ����� �� ����� � �ࢥ� ��।����� �१ ��� internet/intranet, �� �������� �������� ������ ��㤭���. PC1, PC2, PC3 - �� ������ 㧫�, ���筨�� ������ (���������, �ࢥ�, ������⨧����, ��������� � ��.) �� ������ ��⠭������ ᮮ⢥�����饥 �ணࠬ���� ���ᯥ祭�� ��� ᡮન ������ ���稪��. � ����⢥ ⠪��� �� ����� ����㯠�� Net-SNMP �ࢥ�. AGENT_1 � AGENT_2 - �� ���������, � ��⠭�������� ��⥬�� MonM � �離� � �� �ਧ����� ᮡ���� ����� �� ���筨���. �ਬ� ⠪��� �� ����� ����㯠�� Net-SNMP ������. ���࠭�� ����� ��।����� � ��⨢��� ०��� �� SERVER. ��ࠢ�� ������ ����� �����⢫�����, ���ਬ��, ���।�⢮� �����騪� ����� cron, ��� ��� ��������. ������ �⮣� ����� ���� �ᯮ�짮���� � ��㣨� ᯮᮡ� ��⥬����� ���� ���筨��� ������. SERVER - �� ����� ��魮� ����㤮�����, � ��⠭������� WEB-�ࢥ Apache � ��⥬�� MonM. ��ࢥ� �믮���� ����� �ਥ�� ������ �� ����⮢, ��࠭���� �� � ���� ������, � ⠪�� �믮���� �㭪樨 ������� ��䨪��, �ᯮ���� �� �⮬ ��⥬� RRDtool. ����� �� �ࢥ� ᮡ������ �� ����⮢ � ���� ������ ⠡���� SQLite ��⥬ �� ����ﭭ��� ����������. ��⥬, �� ᮡ࠭�� ����� ����訢����� � ��।����� � ��।������� ���� RRD, ��� ��� ������� ��䨪� � ����� ������ ᮡ�ࠥ��� � �⤥��� ������� �� RRDtool. � ������ ���������� ������ � RRD ����� ������ �ந�室�� ��⮬���� ������� ��䨪��. ����� ����� � 横�� �. ALERTGRID AND RRD WORK CYCLE � 䠩� monm_agrrd.sh ALERTGRID AND RRD WORK CYCLE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ while not the end of the universe do get result of monm alertgrid export into variable $in echo $in | monm rrd update -I -o /dev/null # Creating graphs monm rrd graph -o /dev/null wait for 5 minutes done Typical example of use: # Run local agent monm alertgrid agent -o /dev/null # Export data from alertgrid database into rrd database monm alertgrid export | monm rrd update -I -o /dev/null # Creating graphs monm rrd graph -o /dev/null API --- ��騥 �ࠢ��� ��।�� ������ ����� ����ᠬ� ��諨 �ਬ������ � � ����� �����, ⠪��, ���ਬ��, ��� ��।�� ������ ����� ᠡ����ᠬ� ��ࠡ��稪��. ��।�� ����� alertgrid ~~~~~~~~~~~~~~~~~~~~~~~~ ��ଠ� XML ��� ��।�� �� ������� ���筨��� ������ ������. <response> <count name="COUNT_NAME"> <expires>+5m</expires> <status>OK|ERROR</status> <error code="0"><![CDATA[MESSAGE]]></error> <value type="DIG|STR|TAB"><![CDATA[VALUE]]></value> </count> ... </response> ��ଠ� XML ��� ��।�� �� ����� �ࢥ��. <alertgrid> <name>ALERTGRID_NAME</name> <count name="COUNT_NAME"> <pubdate date="123456789">Wed, 05 Mar 2014 09:50:04 GMT</pubdate> <expires date="123456799">Wed, 05 Mar 2014 09:50:14 GMT</expires> <worktms>[25059] {TimeStamp: +0.9428 sec}</worktms> <status>OK|ERROR</status> <error code="0"><![CDATA[MESSAGE]]></error> <value type="DIG|STR"><![CDATA[VALUE]]></value> </count> ... </alertgrid> ��� �ନ����� ⠪: <IP>::<ALERTGRID_NAME>::<COUNT_NAME> ���ਬ��: 127.0.0.1::foo::resources::hdd::used = ... 127.0.0.1::bar::SNMPv2-MIB::sysDescr.0 = ... � ⠡���� alertgrid ����� ������� � ���� �� ��ࠧ��: ID | IP | ALERTGID_NAME | COUNT_NAME | TYPE | VALUE | PUBDATE | EXPIRES | STATUS | ERRCODE | ERRMSG ----+----+---------------+------------+------+-------+---------+---------+--------+---------+-------- 1 | 127.0.0.1 | foo | resources::hdd::used | DIG | 0 | DTS | DTF | OK | 0 | ����砭��: � ����� == "OK" � error = "" � code = 0. � ����� == "ERROR" � error = "�����_�������_������" ����� ��� code = 1 ��� �� ���� �⫨筮� �� 0. ���� pubdate -- ��� �㡫���樨 १����; expires -- ��� ���祭�� �ப� ����⢨� १���� � � ⮬ � ��㣮� ����� ���ਡ�� date ᮤ�ন� �६� � �ଠ� "unix time". ���� value ᮤ�ন� ���祭�� ���稪�. ���� �� ����� ERROR ���祭�� ���뢠����. __END__