netsaint/0040755000076400000000000000000007126735016011243 5ustar timrootnetsaint/config.info0100644000076400000000000000117107111510036013345 0ustar timrooticons_per_row=Number of icons per row,0 main_config=Full path to main configuration file,0 host_config=Full path to host configuration file,0 cgi_config=Full path to CGI configuration file,0 command_file=Full path to command file,0 output_url=Url to NetSaint output,0 sort_hosts=Sort hosts on view?,1,1-Yes,0-No sort_contacts=Sort contacts on view?,1,1-Yes,0-No sort_commands=Sort commands on view?,1,1-Yes,0-No list_commands_detailed=List commands detailed on view?,1,1-Yes,0-No sort_timeperiods=Sort time periods on view?,1,1-Yes,0-No sort_services=Sort services on view?,1,1-Yes,0-No show_logo=Show logo on startpage?,1,1-Yes,0-Nonetsaint/config0100644000076400000000000000040507112001766012420 0ustar timrooticons_per_row=4 main_config=/etc/netsaint/netsaint.cfg host_config=/etc/netsaint/hosts.cfg cgi_config=/home/httpd/cgi-bin/nscgi.cfg output_url= sort_hosts=1 sort_contacts=1 sort_commands=1 list_commands_detailed=1 sort_timeperiods=1 sort_services=1 show_logo=1 netsaint/images/0040755000076400000000000000000007074122115012500 5ustar timrootnetsaint/images/icon.gif0100644000076400000000000000356007027464455014136 0ustar timrootGIF89a00  lkm ":9<@?BFEH-,0jhs¾ۣ譪povμԙ[Zfa`j󃂑zy ]]ZZBB_oommffUUzNNpHHg<3+rK?;-@hQD&paK.p*@ `%.tO]7$p +D(0@c %*< ]dQ= q?Q q)%}FCnҏߋ[c@$ DTܐ DTG hrh"p ~STa#xD#\b"Qx$2a@ i#"O`L-:VDB JDQXb)H @%86PaiRMBZ8!%* ;netsaint/images/template.gif0100644000076400000000000000356006771443034015014 0ustar timrootGIF89a0UUU999rrr!Made with GIMP,0 8AZdiӠhksh߶L|G,rY̥q0 Ԓ0-]%6AkX=Q}~T{Moa-W~~x,vuc&$xa4eSyu`g$bͽ~ʣ `lˁj\QԸꪀ>"{9ۗFḃYWͳ?QdƌJf)hcv'w+#1|XgO-ahB (`DZڄU.EbP FKD[B< [Ŝ" JÞi0*a -VI@ \( I /*!0@*>Lhp20:v6V.᧲.Ԛa& 9M$bE\ d"uKw;_a_J]6㰣'yDt3WA3i6In:&Q,~tj'-W{!ϵ 71w^w P 8hY 2T\mS|FG]څGEvM1%!U.#pGDeV+.ע>>Y68duZ&8\GM}gMY{U.٢XX&#)kpKL(XF1M\Jh#Ma&qrYF*]AhF9hT)L\]1lfj`\㩝pyV*M֪|8tY.$>\)(vJ:(܆N۬n/{'^yySU洦gj5ۃ-,䮳%K5;[~,|ӌJ:uzA࠿d^8)W1ʩz)nj. zÇ9scm%Z[=Sy\ So]5E_]K[+uO5Sn3 bM Ēܶэ5rmBN!-?58Ŕ hOk~ }3^Q8Yκi{=8'r;+pڛͻz*r4[0k&<#/$q;֜tŅ" C Mtv0_+PI 7 >⁲$*F,N|H}t>YxT7s=X!ZÓJsؿd ;v尋F`%-xG#6. .O8xdH!D춨XjXϢV>q7c @<2_V1X^F p\2)Ѹ'OEf'$Gce˲eҐٛD/rI4ڥ@,+'6dlT T(7!@*:!,&ɴ< }h&iRUiџ ηibkCfPM~O('%Sfxy:5v*_I6m =Hn$z4Z(Q\e >5 DnRۘj4 W百5%&Gi:fXJQ-IXq" :xFS|`H ɔj--{ DGjRv-[rzhhGKҚiWֺ6{lgKڢ ͭnwk\ pEr=ߒ:}t+R5.K;netsaint/images/cgi.icon.gif0100644000076400000000000000060407027521703014661 0ustar timrootGIF89a00UUUrrr999!Made with GIMP!,00I8ͻ`(dihlp,t B!N7`` @Xq ZJ1@j ' HL;D~D\>xv8DHDy`Qu:{cozb:d:fDyp:˖DǧjyjZ:kۘTrDqՓ`.C+@4gF*OLxjI &)*`Xɲ˗0cʜI͛8sr;netsaint/images/files.icon.gif0100644000076400000000000000041207027521736015224 0ustar timrootGIF89a00̙fff!,000I 8 ˧ ؍NfFRAʾR[x=KĐ&LNUuEFxL./w jgIۈ@dz9_rt1[5xa}{Tzw>afo~i9'_AhGllHX 4φ@\Ŀ|ߞܭQ ;netsaint/images/logging.icon.gif0100644000076400000000000000072607027521753015557 0ustar timrootGIF89a00fff!,00b 18[h$x`Yvܺ0Պ'z7ZDg;3IQ s4qړ(Ki+Cc bo]7Lg\yG/o$zhwak~#:iN"p|ay"D cwD6dV:r6XP~ Ax Nl9m ĵ.,VI,b  YdTcX>mzo)VKAN*Wu7_>1TA#*=FWwh,4GBJ4K5ɼd=Zd|4"'.mM3ϙj 7^j>D'4%#rG_e8J2Hg:86c%NIT[S i0;o BΠCMB;netsaint/images/misc.icon.gif0100644000076400000000000000071407027522152015053 0ustar timrootGIF89a00!,00 ͋TVc}hc#+vݸh%A 9@Z K9=Ze/L|]7&[gƵg*U{ag&2%' XXSgGG(Fu²Ys)y9%33:` { zK;;`{P ܪ0m۬ D-1,,L:-N.l-gn6<, e#Kˆ 5AchZi5rI#+vwBTHB O 1=cY4MO|*閦NwʇR,tFN^ uiY\'QZ' 3q꾅w Jd~ qup(EJnj;)kV!Ȓ1;netsaint/images/notification.icon.gif0100644000076400000000000000042707027522223016606 0ustar timrootGIF89a00fff!,00脏 Z;{Vv)蛊lK€' ҝå|SP8$2:O9}U.l|0wN>h5RзuGGfXu3X8C)!3IF4gpJ":!3 J;ಶ KSk%k*=DL}litT ~`lݬ~Om๟nD;netsaint/images/hosts.icon.gif0100644000076400000000000000056407027522305015263 0ustar timrootGIF89a00HMzfff!Made with GIMP!,00I8&^`Y l+l2jvjp߹قh|!5JXl=3Q'&uM%5n;+V夝;c=|wnB&z;34 3IkPF莱d˚[;netsaint/images/commands.icon.gif0100644000076400000000000000057307027522513015725 0ustar timrootGIF87a00fff,000hwYUU`mbQcj^FWf.-g_˳l͊rl:Шq|ZSl՘Qy%J koos3m+NO8Vqe20*"!v8²ƾWǷиTˤٻۺ]&b= Hp*I#B .3jI4./9YY ɐp(b$Rn~ L;+{fʱQ 贬2蘋31cf K};netsaint/images/html.icon.gif0100644000076400000000000000037407027523356015075 0ustar timrootGIF89a00!Made with GIMP (tn)!,00ڋ޼I*犦 nlGl'p[Qp8"Q8 c:@f6_x;XIk{2BxlW0s=VT'wƂ(e U9)詇jvfuFeȷZ@dSKt[+D#㛶lLC@c]Ԅ#$ A`(%.KI B^2`;ho N31`@%CSP (`^ qb $؀ EBHHB%PA qX)FTk$*5 U8"G&D!Cd T8Fl{N|01 UL 0u*i{f @ l#mb  0E|[lb&n̫^'ddFne[Nmpry}amA뿥kAn~pcA'n66sMFYoZ0 P P rZ?dgp{,bEq,~@PEA< 7 8: P V XMs p'&mBћaK^AD`cG' !rjZT`P  =3l PEUĐW>{aw# )F Cpi,*{t`:9 EP =qP` 0D}ɠ 6P %FuOdT!yxPC~p x 1$wcuuV I#בm!9cʙP _Tb$CD:lP p us C2"rptI U(agpnn`Frv g٠  C@vG" "{22 ˰ @ LO tC9@v#` P  ce@ }n &o:ID Vƀ P 5@*$0W 0 RL $Z Sm6IxL   P>]|1~ I pG!t s07zӇL@ Gp!` *$t<< Γ I G}P 𥸪}bZS!` ՠ Xr  pG#b 0wt'a62}Xа 9H  O0onQ W ip8r p a1bx `'  N`J0#xOb[`re .Ezr  PI `=0 L Pn0j ^0 `G  @] @QT\xPe-@+^n0 `Od" xjțu^o@QAj!C* ko@%OSBi!Q_t~pbMZM;EP^RCi1@'x' p Sp%O% ,%1Pc{40c 3QD`[|4M0KzPD&3OS2%UqL/o0u4 0vL?D bprDZ/v`8lPuPA_QQqZYp6#n,&s0iipvq갌Sc4 I qB#0"["0#?:@tگ pВLu#pxEtZAgAt 8lTijiӜu)GBzr@DQRɑ.mti!"9lCǝ" ,XIFI{Qt3҉#ȥ4{гDžD2 =/@o`QA` #pf$СٓJ/đ òlp`Y6A=taT7E <2ê(ZwhOʳ=X# ?@g /`鑣P=1K0r af9A 9x : 0#):Џl + 6o ` 9A` ?h0P$^Ib 6xp4@qHzA:`/2f`$]a.@$_`!"xJ$7! 0Lh!Jn )6 * |(8 #l|$q 4tAG,e 6Pcs4R̫ ְ.*paR)@4\TW-5`L ZvP "4AVk Fe T@ DHN4HaTZ\)-f]ȔH5A5 xB R@ap@ E!ЂHNXx`|0Px]n Avw J6"DCH}I0w&A] :0aQ,ࡄ/I„ &BLqxz|%$o(+ 30:X+Pb -!k#d@c5phYАjؚm4B +iCf=%pb#`dGNQ%W"2%p 㤐 '%*&"k +zχW -H"Qt WOW/>ە7# TNiAܗ~%L@X?&PL'!W A`VTɄvXAV sD#21Pc1 9BPҷBoDC A "! O ?b)`HA#X#"MBP͈;(`Έ#  *+U&N{QzTxTK @#pAF%Nx%6!2 R`*J V$M{dRxcpF0D#" U" y4e/?Ll~!,Wx^$8!!J|B P8Bْ%P GxB0U"$(Md5+p&0 zċLwNbx6p&St QB݄'R PBsBPNTM\BKR*0 ;netsaint/images/icon.auth.gif0100644000076400000000000000042307074122115015053 0ustar timrootGIF89a00̙fff!,000I8{י'8yBgB]z:m}!YaM J^ VW gu@VU?_wE/`}y|&z {~s‹óżάйϔ̅رڍ* ׯB ;netsaint/module.info0100644000076400000000000000030507126641211013371 0ustar timrootname=netsaint desc=NetSaint Configuration desc_de=NetSaint Konfiguration category=net os_support=solaris redhat-linux debian-linux slackware-linux suse-linux aix hpux freebsd osf1 irix turbo-linux netsaint/index.cgi0100755000076400000000000000530707126637347013053 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 20.12.1999 $whatfailed=$text{'index_error'}; require './netsaint-lib.pl'; &header($text{'index_title'}, "", "intro", 1, 1, undef, "Written by
Tim Niemueller
Home://page"); print "
\n\n
"; @links=("edit_misc.cgi", "edit_files.cgi", "edit_logging.cgi", "edit_notifications.cgi", "list_hosts.cgi", "list_contacts.cgi", "list_commands.cgi", "list_extcommands.cgi", "list_timeperiods.cgi", "edit_cgi.cgi", "edit_auth.cgi"); @texts=("Miscellaneous", "Files", "Logging", "Notifications", "Hosts", "Contacts", "Commands", "External Commands", "Time Periods", "CGI", $text{'index_icon_auth'}); @images=("images/misc.icon.gif", "images/files.icon.gif", "images/logging.icon.gif", "images/notification.icon.gif", "images/hosts.icon.gif", "images/contacts.icon.gif", "images/commands.icon.gif", "images/commands.icon.gif", "images/timeperiods.icon.gif", "images/cgi.icon.gif", "images/icon.auth.gif"); if ($config{'output_url'}) { push(@links, $config{'output_url'}); push(@texts, $text{'index_icon_output'}); push(@images, "images/html.icon.gif"); } &icons_table(\@links, \@texts, \@images, $config{'icons_per_row'}); if ($config{'show_logo'}) { print "\n


"; print "[ NetSaint Configuration $version ]\n
\n"; } else { print ""; print "\n\n"; print "

[ NetSaint Configuration $version ]
\n"; print ""; } print "
\n"; &footer("/", $text{'index'}); ### END of index.cgi ###. netsaint/acl_security.pl0100644000076400000000000002573207073136203014266 0ustar timroot do '../web-lib.pl'; &init_config("netsaint"); # acl_security_form(&options) # Output HTML for editing security options for the apache module sub acl_security_form { print "$text{'acl_files'}"; print "{'files'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'files'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_logging'}"; print "{'logging'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'logging'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_misc'}"; print "{'misc'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'misc'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_html'}"; print "{'html'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'html'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_not'}"; print "{'not'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'not'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_cgi'}"; print "{'cgi'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'cgi'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_host_edit'}"; print "{'hostedit'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'hostedit'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_host_create'}"; print "{'hostcreate'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'hostcreate'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_host_delete'}"; print "{'hostdelete'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'hostdelete'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_hostgroup_edit'}"; print "{'hostgroupedit'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'hostgroupedit'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_hostgroup_create'}"; print "{'hostgroupcreate'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'hostgroupcreate'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_hostgroup_delete'}"; print "{'hostgroupdelete'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'hostgroupdelete'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_contact_edit'}"; print "{'contactedit'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'contactedit'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_contact_create'}"; print "{'contactcreate'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'contactcreate'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_contact_delete'}"; print "{'contactdelete'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'contactdelete'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_contactgroup_edit'}"; print "{'contactgroupedit'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'contactgroupedit'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_contactgroup_create'}"; print "{'contactgroupcreate'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'contactgroupcreate'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_contactgroup_delete'}"; print "{'contactgroupdelete'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'contactgroupdelete'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_command_edit'}"; print "{'commandedit'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'commandedit'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_command_create'}"; print "{'commandcreate'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'commandcreate'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_command_delete'}"; print "{'commanddelete'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'commanddelete'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_timeperiod_edit'}"; print "{'timeperiodedit'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'timeperiodedit'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_timeperiod_create'}"; print "{'timeperiodcreate'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'timeperiodcreate'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_timeperiod_delete'}"; print "{'timeperioddelete'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'timeperioddelete'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_service_edit'}"; print "{'serviceedit'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'serviceedit'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_service_create'}"; print "{'servicecreate'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'servicecreate'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_service_delete'}"; print "{'servicedelete'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'servicedelete'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_extcomm_edit'}"; print "{'extcommedit'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'extcommedit'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_extcomm_create'}"; print "{'extcommcreate'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'extcommcreate'}) ? "" : " CHECKED", "> $text{'no'}\n"; print "$text{'acl_extcomm_delete'}"; print "{'extcommdelete'}) ? " CHECKED" : "", "> $text{'yes'} "; print "{'extcommdelete'}) ? "" : " CHECKED", "> $text{'no'}\n"; } # acl_security_save(&options) # Parse the form for security options for the apache module sub acl_security_save { $_[0]->{'files'} = $in{'files'}; $_[0]->{'html'} = $in{'html'}; $_[0]->{'cgi'} = $in{'cgi'}; $_[0]->{'misc'} = $in{'misc'}; $_[0]->{'not'} = $in{'not'}; $_[0]->{'logging'} = $in{'logging'}; $_[0]->{'hostedit'} = $in{'hostedit'}; $_[0]->{'hostcreate'} = $in{'hostcreate'}; $_[0]->{'hostdelete'} = $in{'hostdelete'}; $_[0]->{'hostgroupedit'} = $in{'hostgroupedit'}; $_[0]->{'hostgroupcreate'} = $in{'hostgroupcreate'}; $_[0]->{'hostgroupdelete'} = $in{'hostgroupdelete'}; $_[0]->{'contactedit'} = $in{'contactedit'}; $_[0]->{'contactcreate'} = $in{'contactcreate'}; $_[0]->{'contactdelete'} = $in{'contactdelete'}; $_[0]->{'contactgroupedit'} = $in{'contactgroupedit'}; $_[0]->{'contactgroupcreate'} = $in{'contactgroupcreate'}; $_[0]->{'contactgroupdelete'} = $in{'contactgroupdelete'}; $_[0]->{'commandedit'} = $in{'commandedit'}; $_[0]->{'commandcreate'} = $in{'commandcreate'}; $_[0]->{'commanddelete'} = $in{'commanddelete'}; $_[0]->{'timeperiodedit'} = $in{'timeperiodedit'}; $_[0]->{'timeperiodcreate'} = $in{'timeperiodcreate'}; $_[0]->{'timeperioddelete'} = $in{'timeperioddelete'}; $_[0]->{'serviceedit'} = $in{'serviceedit'}; $_[0]->{'servicecreate'} = $in{'servicecreate'}; $_[0]->{'servicedelete'} = $in{'servicedelete'}; $_[0]->{'extcommedit'} = $in{'extcommedit'}; $_[0]->{'extcommcreate'} = $in{'extcommcreate'}; $_[0]->{'extcommdelete'} = $in{'extcommdelete'}; } ### END.netsaint/lang/0040755000076400000000000000000007027462355012167 5ustar timrootnetsaint/lang/en0100644000076400000000000004376407126642671012530 0ustar timrootindex_title=NetSaint Configuration index_error=Failed to load NetSaint Configuration module index_merr=Main Configuration file '$1' not found. Check module configuration. index_herr=Hosts Configuration file '$1' not found. Check module configuration. index_cerr=Configuration file '$1' not found. Check module configuration. index_icon_auth=CGI Authentication index_icon_output=View NetSaint Output seconds=seconds timeunits=time units name=Name efiles_title=Files efiles_notallowed=You are not allowed to edit the file settings efiles_error=Failed to open files page efiles_header=File Options efiles_log=Full path to log file efiles_hostcfg=Full path to host configuration file (same as in module configuration!) efiles_status=Full path to status file efiles_temp=Full path to temp file efiles_comm=Full path to external command file efiles_return=NetSaint configuration ntfcs_title=Notifications ntfcs_notallowed=You are not allowed to edit the notification settings ntfcs_header=Notifications ntfcs_error=Failed to open notifications page ntfcs_summary=Generic Summary ntfcs_pager=Admin Pager Number or email-to-pager gateway ntfcs_email=Admin email ntfcs_return=NetSaint configuration log_title=Logging log_notallowed=You are not allowed to edit the logging settings log_header=Logging Options log_error=Failed to open logging page log_level=Log Level log_use_syslog=Use Syslog facility? log_syslog_level=Syslog Level log_notifications=Log Notifications? log_service_retries=Log service check retries? log_host_retries=Log host check retries? log_event_handler=Log host and service event handlers? log_rotate=Rotate logs log_rotate_n=No Rotation log_rotate_h=Hourly log_rotate_d=Daily log_rotate_w=Weekly log_rotate_m=Monthly log_rotate_archive=Archive directory for logs log_return=NetSaint configuration misc_title=Miscellaneous misc_notallowed=You are not allowed to edit the miscellaneous settings misc_header=Miscellaneous Options misc_error=Failed to open miscellanous options page misc_sleep_time=Time to sleep between service checks misc_interval_length=Timing interval length misc_aggressive=Aggressive Host Checking? misc_mode=Program mode misc_mode_active=Active misc_mode_standby=Standby misc_eventh=Eventhandler Settings misc_globeh_host=Global Host Eventhandler misc_globeh_serv=Global Service Eventhandler misc_chkbehav=Checking Behavior misc_intchk_smart=Smart misc_intchk_no=No Delay misc_intchk_dumb=Dumb Delay (1 sec) misc_intchk_delmeth=Method to use to determine time between checks misc_serv_intleav_factor=Service check interleave factor misc_servintleav_smart=Smart misc_servintleav_usrdef=User defined misc_max_conc_checks=Maximum concurrent checks misc_serv_reap_freq=Service reaper frequency misc_return=NetSaint configuration cgi_title=CGI Options cgi_notallowed=You are not allowed to edit the CGI settings cgi_header=CGI Options cgi_error=Failed to open CGI Options page cgi_main_config_file=Full path to main configuration file cgi_physical_html_path=Physical (local) path to html dir cgi_url_html_path=URL to HTML path cgi_url_cgibin_path=URL to CGI-BIN cgi_process_check_command=Process Check Command cgi_suppress_alert_window=Suppress alert window cgi_refresh_rate=Refreshrate cgi_norefresh=(Enter nothing for no refresh) cgi_table_fg_color=Custom HTML foreground color cgi_table_bg_color=Custom HTML background color cgi_table_bg_odd_color=Custom HTML background color for odd lines cgi_table_bg_even_color=Custom HTML background color for even lines cgi_return=NetSaint configuration auth_title=CGI Authentication auth_notallowed=You are not allowed to edit the CGI authentication settings auth_header=CGI Authentication Options auth_error=Failed to open CGI authentication options page auth_use=Use Authentication? auth_default_user=Default User (be careful, read the help!) auth_access=Users with access to... auth_users_sysinfo=System Information auth_users_syscomm=System Commands auth_users_confinf=Configuration Info auth_users_hosts=All Hosts auth_users_hostcomm=All Host Commands auth_users_serv=All Services auth_users_servcomm=All Service Commands auth_return=NetSaint configuration hosts_title=Hosts hosts_error=Failed to open hosts page hosts_hosts=Hosts hosts_hostgroups=Host Groups hosts_new_host=Define a new host hosts_new_hostgroup=Define a new hostgroup hosts_return=NetSaint configuration host_title_edit=Edit Host host_title_create=Create Host host_error=Failed to open host page host_header=Edit host $1 host_alias=Host alias host_address=Host IP or FQDN host_parent=Parent host host_notification=Notification host_not_period=Period host_not_none=None host_not_interval=Interval host_not_recovery=Notify recovery host_not_down=Notify down host_not_unreachable=Notify unreachable host_check_command=Command to check host host_check_command_none=None host_max_attempts=Max attempts host_eventhandler=Event handler host_eventhandler_none=None host_none=None host_groups=Host is member of hostgroup(s) host_extinfo=Extended Host Information (optional) host_use_cgiextinfo=Use extended host info? host_notes_url=URL for further info host_img_icon=Icon host_img_vrml=VRML grahpic host_img_gd2=GD2 graphic host_alt_tag=Alt tag host_delete=Delete Host host_create=Create Host host_notfound=Host '$1' not found in host configuration file host_services=Services for this host host_no_services=No services found! host_new_service=Define a new service host_return=hosts hostgroup_title_edit=Edit Hostgroup hostgroup_title_create=Create Hostgroup hostgroup_error=Failed to open hostgroup page hostgroup_header=Edit hostgroup $1 hostgroup_alias=Hostgroup alias hostgroup_members=Members of this group hostgroup_contactgroups=Contact groups hostgroup_delete=Delete Hostgroup hostgroup_create=Create Hostgroup hostgroup_return=hosts contacts_title=Contacts contacts_error=Failed to open contacts page contacts_contacts=Contacts contacts_contactgroups=Contact Groups contacts_new_contact=Define a new Contact contacts_new_contactgroup=Define a new Contactgroup contacts_return=NetSaint configuration contact_title_edit=Edit Contact contact_title_create=Create Contact contact_error=Failed to open contact page contact_header=Edit contact $1 contact_alias=Alias contact_email=email Address contact_pager=Pager Number/Address contact_notifications=Notify on... contact_serv_comm=Service command(s) contact_host_comm=Host command(s) contact_serv_rec=Service Recovery contact_serv_crit=Service Critical contact_serv_warn=Service Warning contact_host_rec=Host Recovery contact_host_down=Host down contact_host_unre=Host unreachable contact_not_none=None contact_svc_period=Service Period contact_host_period=Host Period contact_delete=Delete Contact contact_create=Create Contact contact_return=contacts contactgroup_title_edit=Edit Contactgroup contactgroup_title_create=Create Contactgroup contactgroup_error=Failed to open contactgroup page contactgroup_header=Edit contactgroup $1 contactgroup_alias=Alias contactgroup_members=Members of this group contactgroup_delete=Delete Contactgroup contactgroup_create=Create Contactgroup contactgroup_return=contacts commands_title=Commands commands_error=Failed to open commands page commands_header=Commands commands_new=Define new command commands_return=NetSaint configuration command_title_edit=Edit Command command_title_create=Create Command command_error=Failed to open command page command_header=Edit command $1 command_command=Command command_delete=Delete Command command_create=Create Command command_return=commands extcommands_title=External Commands extcommands_error=Failed to open external commands page extcommands_header=External Commands extcommands_new=Push new external command extcommands_err_nofound=No external commands found! extcommands_config=Configure external command options extcommands_return=NetSaint configuration extcommand_title_edit=Edit External Command extcommand_title_create=Create External Command extcommand_error=Failed to open external command page extcommand_header=Edit external command $1 extcommand_command=External Command extcommand_arguments=Arguments extcommand_delete=Delete External Command extcommand_create=Create External Command extcommand_return=external commands extcommopt_title=External Command Options extcommopt_notallowed=You are not allowed to edit the options of external commands extcommopt_error=Failed to open external command options page extcommopt_header=Edit external command options extcommopt_check=Check for external commands? extcommopt_interval=Check interval: extcommopt_return=external commands service_title_edit=Edit Service service_title_create=Create Service service_error=Failed to open service page service_header=Edit service $1 for host $2 service_description=Service Description service_notification=Notification service_not_period=Period service_not_none=None service_not_interval=Interval service_not_recovery=Notify recovery service_not_crit=Notify critical service_not_warn=Notify warning service_check_period=Period for checking service service_check_period_none=None service_check_interval=Check interval service_retry_interval=Retry interval service_check_command=Command to check service service_check_command_none=None service_max_attempts=Max attempts service_eventhandler=Event handler service_eventhandler_none=None service_contactgroups=Contactgroups service_command=Check Command service_vanilla_command=Use "Vanilla" (on Commands page defined) command service_vanilla_arguments=with arguments service_vanilla_args_cmnt=(One Argument per line) service_raw_command=Use this raw command line service_delete=Delete Service service_create=Create Service service_return=edit host $1 timeperiods_title=Timeperiods timeperiods_error=Failed to open timeperiods page timeperiods_timeperiods=Timeperiods timeperiods_new=Define a new Timeperiod timeperiods_return=NetSaint configuration timeperiod_title_edit=Edit Timeperiod timeperiod_title_create=Create Timeperiod timeperiod_error=Failed to open timeperiod page timeperiod_header=Edit timeperiod $1 timeperiod_alias=Alias timeperiod_sunday=Sunday timeperiod_monday=Monday timeperiod_tuesday=Tuesday timeperiod_wednesday=Wednesday timeperiod_thursday=Thursday timeperiod_friday=Friday timeperiod_saturday=Saturday timeperiod_one_per_line=(One period per line) timeperiod_delete=Delete Timeperiod timeperiod_create=Create Timeperiod timeperiod_return=timeperiods timeperiod_desc=Enter one period per line with the format hh:mm-HH:MM (where hh:mm is the
beginning and HH:MM is the end of the period). All periods together are the
timeperiod. sfiles_error=Failed to save file options sfiles_nofile=No $1 file given sfiles_notfound=File '$1' could not be found slogging_error=Failed to save logging options slogging_invalid=Invalid value '$1' for $2 (must be $3) slogging_err_inv_logrotate=Log rotation method slogging_err_inv_logrotate2=n, h, d, w or m slogging_err_logrotarch=log rotation archive path slogging_err_logrotarch2=a directory smisc_error=Failed to save miscellaneous options smisc_invalid=Invalid or missing value $1 for $2 (must be $3) smisc_err_inv_scilf=service interleave factor smisc_err_inv_scilf2=a number smisc_err_inv_icdm=inter check delay method smisc_err_inv_icdm2=n, d or s smisc_err_inv_maxconcchk=maximum concurrent checks smisc_err_inv_maxconcchk2=a number smisc_err_inv_servreapfreq=service reaper frequency smisc_err_inv_servreapfreq2=a number smisc_err_progmode=program mode smisc_err_progmode=a or s smisc_err_globserveh=Command defined as global service eventhandler notfound smisc_err_globhosteh=Command defined as global host eventhandler notfound sntfcs_error=Failed to save notification options sntfcs_missing=Missing value for $1 shost_error=Failed to save host shost_already_exists=A host named '$1' already exists. Choose another name shost_noalias=No alias given. You should give an alias for this host shost_noaddress=No address given. You must give an IP or FQDN shost_nogroup=No group given for host. You must give at least one group shost_maxattempts_err=Missing or invalid value for max attempts shost_invalid=Invalid value $1 for $2 (must be $3) shost_interval_err=Missing or invalid value for notification interval shost_notperiod_err=You entered a notification period which does not exist shost_checkcommand_err=You entered a check command which does not exist shost_eventhandler_err=You entered an eventhandler which does not exist shost_parent_err=You entered a parent which does not exist shost_notfound=Host $1 could not been found, so it cannot be removed shost_notallowed_edit=You are not allowed to edit hosts shost_notallowed_create=You are not allowed to create hosts shost_notallowed_delete=You are not allowed to delete hosts shostgroup_error=Failed to save hostgroup shostgroup_already_exists=A hostgroup named '$1' already exists. Choose another name shostgroup_noalias=No alias given. You should give an alias for this hostgroup shostgroup_cannotremove=You cannot remove the host '$1' from this hostgroup because this is the only group for this host shostgroup_notfound=Hostgroup $1 could not been found, so it cannot be removed _notallowed_edit=You are not allowed to edit _notallowed_create=You are not allowed to create _notallowed_delete=You are not allowed to delete scontact_error=Failed to save contact scontact_missing=The value for $1 is missing scontact_invalid=The value $1 for $2 is invalid (must be 0 or 1) scontact_notfound=The contact $1 could not been found scgi_error=Failed to save CGI options scgi_inv_dir=Directory '$1' (for setting $2) is missing or does not exist scgi_invalid=The value $1 for $2 is invalid (must $3) scgi_nomainfile=No file given for main configuration file scgi_0or1=0 or 1 scgi_procchkcomm=process check command scgi_suppalwin=suppressig alert window scgi_number=number scgi_table_fg_color=table foreground color scgi_table_bg_color=table background color scgi_hexcolor=hexadezimal color scgi_table_bg_odd_color=odd line background color scgi_table_bg_even_color=even line background color sauth_error=Failed to save CGI authentication options sauth_invalid=The value $1 for $2 is invalid (must be $3) sauth_1or0=1 or 0 sauth_useauth=authentication usage sauth_defaultuser=default user sauth_invalid2=Missing value for $1 sauth_sysinfo=system information access sauth_confinf=configuration information access sauth_syscom=system/process command access sauth_hosts=host access sauth_hostcomm=host command access sauth_serv=service access sauth_servcomm=service commands scontactgroup_error=Failed to save contactgroup scontactgroup_already_exists=A contactgroup named '$1' already exists. Choose another name scontactgroup_noalias=No alias given. You should give an alias for this contactgroup scontactgroup_cannotremove=You cannot remove the contact '$1' from this contactgroup because this is the only group for this contact scontactgroup_notfound=The contactgroup $1 could not been found scontactgroup_notallowed_edit=You are not allowed to edit contactgroups scontactgroup_notallowed_create=You are not allowed to create contactgroups scontactgroup_notallowed_delete=You are not allowed to delete contactgroups scommand_error=Failed to save command scommand_notfound=The command $1 could not been found scommand_already_exists=A command named '$1' already exists. Choose another name scommand_notallowed_edit=You are not allowed to edit commands scommand_notallowed_create=You are not allowed to create commands scommand_notallowed_delete=You are not allowed to delete commands sextcomm_error=Failed to save external command sextcomm_notallowed_delete=You are not allowed to delete external commands sextcomm_notallowed_edit=You are not allowed to edit external commands sextcomm_notallowed_create=You are not allowed to create external commands sextcomm_notfound=Sorry, command not found ($1) sextcommopt_error=Failed to save external command options sextcommopt_invalid=The value $1 for $2 is invalid (must be $3) sextcommopt_interval=check interval sextcommopt_integer=integer sextcommopt_check=check external commands sextcommopt_1or0=1 or 0 stimeperiod_error=Failed to save time period stimeperiod_missing=You must give a timeperiod alias stimeperiod_already_exists=A timeperiod named '$1' already exists. Choose another name stimeperiod_invalid=The timeperiod '$1' is invalid. Must be of the format hh:mm-HH:MM stimeperiod_notallowed_edit=You are not allowed to edit timeperiods stimeperiod_notallowed_create=You are not allowed to create timeperiods stimeperiod_notallowed_delete=You are not allowed to delete timeperiods sservice_error=Failed to save service sservice_nodesc=You must enter a name for the service sservice_already_exists=A service named '$1' already exists. Choose another name sservice_miss_inv=Missing or invalid value $1 for $2 sservice_vanilla=You choose Vanilla command but you didn't give one sservice_rawcommand=You choose raw command but you didn't give one sservice_notallowed_edit=You are not allowed to edit services sservice_notallowed_create=You are not allowed to create services sservice_notallowed_delete=You are not allowed to delete services acl_files=Can modify file settings acl_html=Can modify HTML settings acl_cgi=Can modify CGI settings acl_misc=Can modify miscellaneous settings acl_not=Can modify notification settings acl_logging=Can modify logging settings acl_host_edit=Can edit hosts acl_host_create=Can create hosts acl_host_delete=Can delete hosts acl_hostgroup_edit=Can edit hostgroups acl_hostgroup_create=Can create hostgroups acl_hostgroup_delete=Can delete hostgroups acl_contact_edit=Can edit contacts acl_contact_create=Can create contacts acl_contact_delete=Can delete contacts acl_contactgroup_edit=Can edit contacgroups acl_contactgroup_create=Can create contactgroups acl_contactgroup_delete=Can delete contactgroups acl_command_edit=Can edit commands acl_command_create=Can create commands acl_command_delete=Can delete commands acl_timeperiod_edit=Can edit timeperiods acl_timeperiod_create=Can create timeperiods acl_timeperiod_delete=Can delete timeperiods acl_service_edit=Can edit services acl_service_create=Can create services acl_service_delete=Can delete services acl_extcomm_edit=Can edit external commands acl_extcomm_create=Can create external commands acl_extcomm_delete=Can delete external commands netsaint/netsaint-lib.pl0100600000076400000000000000452407126735551014167 0ustar timroot # NetSaint Configuration Webmin Module # Copyright (C) 1999-2000 by Tim Niemueller, Stephen Nodvin, TeleVideo Global, Inc. # Written by Tim Niemueller - http://www.niemueller.de # # 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. # Created: 21.12.1999 do '../web-lib.pl'; $|=1; &init_config("netsaint"); %access = &get_module_acl(); (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); &ReadParse(); # parse_config(configfile) # Parse one of the config files # configfile is the path to the configuration file sub parse_config { local(@conf, @lines, $i); open(CF, $_[0]); @lines=; close(CF); for (my $i; $i<@lines; $i++) { local(%directive, $name, $value, @values); next if ($lines[$i] =~ /^#/); chomp $lines[$i]; next if (!$lines[$i] || ($lines[$i] =~ /^\s+$/)); ($name, $value)=split('=', $lines[$i], 2); @values=split(';', $value); $directive{'name'}=$name; $directive{'values'}=\@values; $directive{'line'}=$i; push(@conf, \%directive); } return @conf; } sub find_name { local($conf, $line); $conf=$_[1]; foreach $line (@{$conf}) { if ($line->{'name'} eq "$_[0]") { return $line } } return undef; } sub find_struct { local($conf, $line, $name, @rv); $name=$_[0]; $conf=$_[1]; foreach $line (@{$conf}) { if ($line->{'name'} =~ /^${name}\[/) { local $tstr=$line->{'name'}; $line->{'name'}=substr($tstr, 0, index($tstr, '[')); $line->{'value'}=substr($tstr, index($tstr, '[')+1, (length($tstr)-index($tstr, '[')-2)); next if (!$line->{'value'}); push(@rv, $line); } } return @rv; } $version="0.80.1-0.0.5"; ### END.netsaint/edit_files.cgi0100755000076400000000000000711507126637347014052 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 21.12.1999 require './netsaint-lib.pl'; $access{'files'} || &error($text{'efiles_notallowed'}); $whatfailed=$text{'efiles_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'main_config'}); $logselector=&file_chooser_button('log', 0, 0); $hostcfgselector=&file_chooser_button('hostcfg', 0, 0); $statusselector=&file_chooser_button('status', 0, 0); $tempselector=&file_chooser_button('temp', 0, 0); $commselector=&file_chooser_button('comm', 0, 0); $tmp=&find_name('log_file', \@conf); $logvalue=$tmp->{'values'}->[0]; $tmp=&find_name('cfg_file', \@conf); $hostcfgvalue=$tmp->{'values'}->[0]; $tmp=&find_name('status_file', \@conf); $statusvalue=$tmp->{'values'}->[0]; $tmp=&find_name('temp_file', \@conf); $tempvalue=$tmp->{'values'}->[0]; $tmp=&find_name('command_file', \@conf); $commvalue=$tmp->{'values'}->[0]; &header($text{'efiles_title'}, "", "files", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); # foreach $l (@conf) { # print "\n
$l->{'name'}::$l->{'values'}->[0]::$l->{'line'}"; # } print <
$text{'efiles_header'}
$text{'efiles_log'} $logselector
$text{'efiles_hostcfg'} $hostcfgselector
$text{'efiles_status'} $statusselector
$text{'efiles_temp'} $tempselector
$text{'efiles_comm'} $commselector

EOM print "
\n"; &footer("", $text{'efiles_return'}); ### END of index.cgi ###. netsaint/edit_notifications.cgi0100755000076400000000000000544307126637347015623 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 21.12.1999 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $access{'not'} || &error($text{'ntfcs_notallowed'}); $whatfailed=$text{'ntfcs_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'main_config'}); $tmp=&find_name('generic_summary', \@conf); $summary_value=$tmp->{'values'}->[0]; $tmp=&find_name('admin_pager', \@conf); $pager_value=$tmp->{'values'}->[0]; $tmp=&find_name('admin_email', \@conf); $email_value=$tmp->{'values'}->[0]; &header($text{'ntfcs_title'}, "", "notifications", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); print <
$text{'ntfcs_header'}
$text{'ntfcs_summary'}
$text{'ntfcs_pager'}
$text{'ntfcs_email'}

EOM print "
\n"; &footer("", $text{'ntfcs_return'}); ### END of index.cgi ###. netsaint/edit_logging.cgi0100755000076400000000000001347507126637347014404 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999/2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 21.12.1999 require './netsaint-lib.pl'; $access{'logging'} || &error($text{'log_notallowed'}); $whatfailed=$text{'log_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'main_config'}); $tmp=&find_name('log_level', \@conf); if ($tmp->{'values'}->[0] == 1) { $level1=" SELECTED" } else { $level2=" SELECTED" } $tmp=&find_name('use_syslog', \@conf); if ($tmp->{'values'}->[0]) { $usesyslog=" CHECKED" } else { $nusesyslog=" CHECKED" } $tmp=&find_name('syslog_level', \@conf); if ($tmp->{'values'}->[0] == 1) { $slevel1=" SELECTED" } else { $slevel2=" SELECTED" } $tmp=&find_name('log_notifications', \@conf); if ($tmp->{'values'}->[0]) { $lognot=" CHECKED" } else { $nlognot=" CHECKED" } $tmp=&find_name('log_service_retries', \@conf); if ($tmp->{'values'}->[0]) { $serret=" CHECKED" } else { $nserret=" CHECKED" } $tmp=&find_name('log_event_handlers', \@conf); if ($tmp->{'values'}->[0]) { $evha=" CHECKED" } else { $nevha=" CHECKED" } $tmp=&find_name('log_host_retries', \@conf); if ($tmp->{'values'}->[0]) { $horet=" CHECKED" } else { $nhoret=" CHECKED" } $tmp=&find_name('log_rotation_method', \@conf); if ($tmp->{'values'}->[0] eq "n") { $lrot_n=" SELECTED" } elsif ($tmp->{'values'}->[0] eq "h") { $lrot_h=" SELECTED" } elsif ($tmp->{'values'}->[0] eq "d") { $lrot_d=" SELECTED" } elsif ($tmp->{'values'}->[0] eq "w") { $lrot_w=" SELECTED" } elsif ($tmp->{'values'}->[0] eq "m") { $lrot_m=" SELECTED" } $tmp=&find_name('log_archive_path', \@conf); $logrotarch_value=$tmp->{'values'}->[0]; $logselector=&file_chooser_button('logrotarch', 0, 0); &header($text{'log_title'}, "", "logging", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); print <
$text{'log_header'}
$text{'log_level'}
$text{'log_use_syslog'} $text{'yes'} $text{'no'} $text{'log_syslog_level'}
$text{'log_notifications'} $text{'yes'} $text{'no'}
$text{'log_service_retries'} $text{'yes'} $text{'no'}
$text{'log_host_retries'} $text{'yes'} $text{'no'}
$text{'log_event_handler'} $text{'yes'} $text{'no'}
$text{'log_rotate'}
$text{'log_rotate_archive'} $logselector

EOM print "
\n"; &footer("", $text{'log_return'}); ### END of index.cgi ###. netsaint/edit_misc.cgi0100755000076400000000000001503407126637347013702 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999-2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 22.12.1999 $whatfailed=$text{'misc_error'}; require './netsaint-lib.pl'; $access{'misc'} || &error($text{'misc_notallowed'}); @conf=&parse_config($config{'main_config'}); @hostconf=&parse_config($config{'host_config'}); $tmp=&find_name('use_agressive_host_checking', \@conf); if ($tmp->{'values'}->[0]) { $aggr=" CHECKED" } else { $naggr=" CHECKED" } $tmp=&find_name('program_mode', \@conf); if ($tmp->{'values'}->[0] eq "a") { $progmode=" CHECKED" } else { $nprogmode=" CHECKED" } $tmp=&find_name('sleep_time', \@conf); $sleeptime_value=$tmp->{'values'}->[0]; $tmp=&find_name('interval_length', \@conf); $intervallength_value=$tmp->{'values'}->[0]; $useil=($intervallength_value) ? " CHECKED" : ""; $nuseil=($intervallength_value) ? "" : " CHECKED"; $tmp=&find_name('inter_check_delay_method', \@conf); $icdm_v=$tmp->{'values'}->[0]; $icdm_smart=($icdm_v eq "s") ? " SELECTED" : ""; $icdm_no=($icdm_v eq "n") ? " SELECTED" : ""; $icdm_dumb=($icdm_v eq "d") ? " SELECTED" : ""; $tmp=&find_name('service_interleave_factor', \@conf); $servintleavfact_value=($tmp->{'values'}->[0] ne "s") ? $tmp->{'values'}->[0] : ""; $servintleavsmart=($tmp->{'values'}->[0] eq "s") ? " CHECKED" : ""; $servintleavnsmart=($tmp->{'values'}->[0] ne "s") ? " CHECKED" : ""; $tmp=&find_name('max_concurrent_checks', \@conf); $maxconcchk_value=$tmp->{'values'}->[0]; $tmp=&find_name('service_reaper_frequency', \@conf); $servreapfreq_value=$tmp->{'values'}->[0]; $tmp=&find_name('global_host_event_handler', \@conf); $global_host_event_handler_value=$tmp->{'values'}->[0]; $tmp=&find_name('global_service_event_handler', \@conf); $global_service_event_handler_value=$tmp->{'values'}->[0]; &header($text{'misc_title'}, "", "misc", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); print <
$text{'misc_header'}
$text{'misc_mode'} $text{'misc_mode_active'} $text{'misc_mode_standby'}
$text{'misc_aggressive'} $text{'yes'} $text{'no'}
$text{'misc_interval_length'} $text{'default'} $text{'seconds'}


$text{'misc_eventh'}
$text{'misc_globeh_host'}
$text{'misc_globeh_serv'}


$text{'misc_chkbehav'}
$text{'misc_sleep_time'} $text{'seconds'}
$text{'misc_intchk_delmeth'}
$text{'misc_serv_intleav_factor'} $text{'misc_servintleav_smart'} $text{'misc_servintleav_usrdef'}:
$text{'misc_max_conc_checks'}
$text{'misc_serv_reap_freq'}

EOM print "
\n"; &footer("", $text{'misc_return'}); ### END of edit_misc.cgi ###. netsaint/edit_cgi.cgi0100755000076400000000000001213107126637347013504 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999-2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 22.12.1999 $whatfailed=$text{'cgi_error'}; require './netsaint-lib.pl'; $access{'cgi'} || &error($text{'cgi_notallowed'}); $maincfgselector=&file_chooser_button('hostcfg', 0, 0); $phys_html_selector=&file_chooser_button('physicalhtmlpath', 0, 0); @conf=&parse_config($config{'cgi_config'}); $tmp=&find_name('main_config_file', \@conf); $main_config_file_value=$tmp->{'values'}->[0]; $tmp=&find_name('physical_html_path', \@conf); $phys_html_value=$tmp->{'values'}->[0]; $tmp=&find_name('url_html_path', \@conf); $url_html_path_value=$tmp->{'values'}->[0]; $tmp=&find_name('url_cgibin_path', \@conf); $url_cgibin_path_value=$tmp->{'values'}->[0]; $tmp=&find_name('process_check_command', \@conf); $process_check_command_value=$tmp->{'values'}->[0]; $tmp=&find_name('suppress_alert_window', \@conf); if ($tmp->{'values'}->[0]) { $suppalwin=" CHECKED" } else { $nsuppalwin=" CHECKED" } $tmp=&find_name('refresh_rate', \@conf); $refresh_rate_value=$tmp->{'values'}->[0]; $tmp=&find_name('html_table_fg_color', \@conf); $table_fg_color_value=$tmp->{'values'}->[0]; $tmp=&find_name('html_table_bg_color', \@conf); $table_bg_color_value=$tmp->{'values'}->[0]; $tmp=&find_name('html_table_bg_odd_color', \@conf); $table_bg_odd_color_value=$tmp->{'values'}->[0]; $tmp=&find_name('html_table_bg_even_color', \@conf); $table_bg_even_color_value=$tmp->{'values'}->[0]; &header($text{'cgi_title'}, "", "cgi", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); print <
$text{'cgi_header'}
$text{'cgi_main_config_file'} $maincfgselector
$text{'cgi_physical_html_path'} $phys_html_selector
$text{'cgi_url_html_path'}
$text{'cgi_url_cgibin_path'}
$text{'cgi_process_check_command'}
$text{'cgi_suppress_alert_window'} $text{'yes'} $text{'no'}
$text{'cgi_refresh_rate'} $text{'seconds'} $text{'cgi_norefresh'}
$text{'cgi_table_fg_color'}
$text{'cgi_table_bg_color'}
$text{'cgi_table_bg_odd_color'}
$text{'cgi_table_bg_even_color'}

EOM print "
\n"; &footer("", $text{'cgi_return'}); ### END of edit_cgi.cgi ###. netsaint/edit_contact.cgi0100755000076400000000000001661707126637347014412 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999/2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 26.12.1999 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $whatfailed=$text{'contact_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'host_config'}); @contacts=&find_struct('contact', \@conf); $contact=0; foreach $c (@contacts) { if ($c->{'value'} eq $in{'name'}) { $contact=$c; break; } } if ($contact) { $header=&text('contact_header', $contact->{'value'}); $title=$text{'contact_title_edit'}; } else { $header=$text{'contact_create'}; $title=$text{'contact_title_create'}; } &header($title, "", "contact", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); print <
EOM if ($contact) { print ""; } else { print ""; } print <
$header
$text{'name'}
$text{'contact_alias'}
$text{'contact_email'}
$text{'contact_pager'}

EOM if ($contact->{'values'}->[3]) { $sr=" CHECKED" } else { $nsr=" CHECKED" } if ($contact->{'values'}->[4]) { $sc=" CHECKED" } else { $nsc=" CHECKED" } if ($contact->{'values'}->[5]) { $sw=" CHECKED" } else { $nsw=" CHECKED" } if ($contact->{'values'}->[6]) { $hr=" CHECKED" } else { $nhr=" CHECKED" } if ($contact->{'values'}->[7]) { $hd=" CHECKED" } else { $nhd=" CHECKED" } if ($contact->{'values'}->[8]) { $hu=" CHECKED" } else { $nhu=" CHECKED" } print <
$text{'contact_notifications'}
$text{'contact_serv_rec'} $text{'yes'} $text{'no'} $text{'contact_host_rec'} $text{'yes'} $text{'no'}
$text{'contact_serv_crit'} $text{'yes'} $text{'no'} $text{'contact_host_down'} $text{'yes'} $text{'no'}
$text{'contact_serv_warn'} $text{'yes'} $text{'no'} $text{'contact_host_unre'} $text{'yes'} $text{'no'}
$text{'contact_svc_period'} $text{'contact_host_period'}
$text{'contact_serv_comm'} $text{'contact_host_comm'}
EOM if ($contact) { print "\n"; print ""; } else { print ""; } print "
\n"; &footer("list_contacts.cgi", $text{'contact_return'}); ### END of edit_contact.cgi ###. netsaint/edit_host.cgi0100755000076400000000000002375707126637347013737 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999/2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 22.12.1999 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $whatfailed=$text{'host_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'host_config'}); @cgiconf=&parse_config($config{'cgi_config'}); @hosts=&find_struct('host', \@conf); $host=0; foreach $h (@hosts) { if ($h->{'value'} eq $in{'name'}) { $host=$h; last; } } if ($host) { $header=&text('host_header', $host->{'value'}); $title=$text{'host_title_edit'}; } else { $header=$text{'host_create'}; $title=$text{'host_title_create'}; } &header($title, "", "host", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); print <
EOM if ($host) { print ""; } else { print ""; } print <
$header
$text{'name'}
$text{'host_alias'}
$text{'host_notification'}
$text{'host_not_period'}
$text{'host_not_interval'}
$text{'host_not_recovery'} $text{'yes'} $text{'no'}
$text{'host_not_down'} $text{'yes'} $text{'no'}
$text{'host_not_unreachable'} $text{'yes'} $text{'no'}
$text{'host_address'}
$text{'host_parent'}
$text{'host_check_command'} $text{'host_max_attempts'}
$text{'host_eventhandler'}
$text{'host_groups'}

EOM @cgihosts=&find_struct('hostextinfo', \@cgiconf); foreach $h (@cgihosts) { if ($h->{'value'} eq $host->{'value'}) { $cgihost=$h; last; } } if ($cgihost) { $usecgiextinfo=" CHECKED"; } else { $nusecgiextinfo=" CHECKED"; } print <
$text{'host_extinfo'}
$text{'host_use_cgiextinfo'} $text{'yes'} $text{'no'} $text{'host_notes_url'}
$text{'host_img_icon'} $text{'host_img_vrml'}
$text{'host_img_gd2'} $text{'host_alt_tag'}

EOM if ($host) { print "\n"; print ""; print <
$text{'host_services'}
EOM @services=&find_struct('service', \@conf); $i=0; foreach $s (@services) { next if ($s->{'value'} ne $host->{'value'}); if ($i%4 == 0) { print "\n"; } print "\n"; if ($i%4 == 3) { print "\n"; } $i++; } if ((scalar(@services)-1)%4 != 3) { print "\n"; } if (! @services) { print "\n" } print <
{'values'}->[0]\&host=$host->{'value'}\">", "$s->{'values'}->[0]
$text{'host_no_services'}
$text{'host_new_service'} EOM } else { print ""; } print "
\n"; &footer("list_hosts.cgi", $text{'host_return'}); ### END of index.cgi ###. netsaint/edit_hostgroup.cgi0100755000076400000000000000761707126637347015011 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 22.12.1999 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $whatfailed=$text{'hostgroup_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'host_config'}); @hostgroups=&find_struct('hostgroup', \@conf); $host=0; foreach $h (@hostgroups) { if ($h->{'value'} eq $in{'name'}) { $host=$h; break; } } if ($host) { $header=&text('hostgroup_header', $host->{'value'}); $title=$text{'hostgroup_title_edit'}; } else { $header=$text{'hostgroup_create'}; $title=$text{'hostgroup_title_create'}; } @members=split(/,/, $host->{'values'}->[2]); @contacts=split(/,/, $host->{'values'}->[1]); &header($title, "", "hostgroup", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); print <
EOM if ($host) { print ""; } else { print ""; } print <
$header
$text{'name'}
$text{'hostgroup_alias'}
$text{'hostgroup_members'} $text{'hostgroup_contactgroups'}
EOM if ($host) { print "\n"; print ""; } else { print ""; } print "

\n"; &footer("list_hosts.cgi", $text{'hostgroup_return'}); ### END of index.cgi ###. netsaint/list_hosts.cgi0100755000076400000000000000722407126637347014137 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 22.12.1999 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $whatfailed=$text{'hosts_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'host_config'}); @hosts=&find_struct('host', \@conf); &header($text{'hosts_title'}, "", "hosts", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); # foreach $l (@hosts) { # print "\n
$l->{'name'}::$l->{'value'}::$l->{'line'}"; # } if ($config{'sort_hosts'}) { @hosts = sort { $a->{'value'} cmp $b->{'value'} } @hosts; } # Just show names print <
$text{'hosts_hosts'}
EOM for($i=0; $i<@hosts; $i++) { if ($i%4 == 0) { print "\n"; } print "\n"; if ($i%4 == 3) { print "\n"; } } if ((scalar(@hosts)-1)%4 != 3) { print "\n"; } if (! @hosts) { print "\n" } print <
{'value'}\">", "$hosts[$i]->{'value'}
No hosts found!
$text{'hosts_new_host'}
EOM ## Output host groups @hostgroups=&find_struct('hostgroup', \@conf); if ($config{'sort_hosts'}) { @hostgroups = sort { $a->{'value'} cmp $b->{'value'} } @hostgroups; } # Just show names print <
$text{'hosts_hostgroups'}
EOM for($i=0; $i<@hostgroups; $i++) { if ($i%4 == 0) { print "\n"; } print "\n"; if ($i%4 == 3) { print "\n"; } } if ((scalar(@hostgroups)-1)%4 != 3) { print "\n"; } if (! @hostgroups) { print "\n" } print <
{'value'}\">", "$hostgroups[$i]->{'value'}
No host groups found!
$text{'hosts_new_hostgroup'} EOM print "


\n"; &footer("", $text{'hosts_return'}); ### END of index.cgi ###. netsaint/list_contacts.cgi0100755000076400000000000000740707126637347014620 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 22.12.1999 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $whatfailed=$text{'contacts_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'host_config'}); @contacts=&find_struct('contact', \@conf); &header($text{'contacts_title'}, "", "contacts", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); # foreach $l (@hosts) { # print "\n
$l->{'name'}::$l->{'value'}::$l->{'line'}"; # } if ($config{'sort_contacts'}) { @contacts = sort { $a->{'value'} cmp $b->{'value'} } @contacts; } # Just show names print <
$text{'contacts_contacts'}
EOM for($i=0; $i<@contacts; $i++) { if ($i%4 == 0) { print "\n"; } print "\n"; if ($i%4 == 3) { print "\n"; } } if ((scalar(@contacts)-1)%4 != 3) { print "\n"; } if (! @contacts) { print "\n" } print <
{'value'}\">", "$contacts[$i]->{'value'}
No contacts found!
$text{'contacts_new_contact'}
EOM ## Output host groups @contactgroups=&find_struct('contactgroup', \@conf); if ($config{'sort_contacts'}) { @contactgroups = sort { $a->{'value'} cmp $b->{'value'} } @contactgroups; } # Just show names print <
$text{'contacts_contactgroups'}
EOM for($i=0; $i<@contactgroups; $i++) { if ($i%4 == 0) { print "\n"; } print "\n"; if ($i%4 == 3) { print "\n"; } } if ((scalar(@contactgroups)-1)%4 != 3) { print "\n"; } if (! @contactgroups) { print "\n" } print <
{'value'}\">", "$contactgroups[$i]->{'value'}
No contact groups found!
$text{'contacts_new_contactgroup'}

EOM print "
\n"; &footer("", $text{'contacts_return'}); ### END of index.cgi ###. netsaint/edit_contactgroup.cgi0100755000076400000000000000665007126637347015463 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999/2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 26.12.1999 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $whatfailed=$text{'contactgroup_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'host_config'}); @contactgroups=&find_struct('contactgroup', \@conf); $contact=0; foreach $g (@contactgroups) { if ($g->{'value'} eq $in{'name'}) { $contact=$g; break; } } if ($contact) { $header=&text('contactgroup_header', $contact->{'value'}); $title=$text{'contactgroup_title_edit'}; } else { $header=$text{'contactgroup_create'}; $title=$text{'contactgroup_title_create'}; } @members=split(/,/, $contact->{'values'}->[1]); &header($title, "", "contactgroup", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); print <
EOM if ($contact) { print ""; } else { print ""; } print <
$header
$text{'name'}
$text{'contactgroup_alias'}
$text{'contactgroup_members'}
EOM if ($contact) { print "\n"; print ""; } else { print ""; } print "

\n"; &footer("list_contacts.cgi", $text{'contactgroup_return'}); ### END of index.cgi ###. netsaint/list_commands.cgi0100755000076400000000000000600007126637347014567 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 26.12.1999 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $whatfailed=$text{'commands_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'host_config'}); @commands=&find_struct('command', \@conf); &header($text{'commands_title'}, "", "commands", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); if ($config{'sort_commands'}) { @commands = sort { $a->{'value'} cmp $b->{'value'} } @commands; } $colspan=$config{'list_commands_detailed'} ? "2" : "4"; print <
EOM if ($config{'list_commands_detailed'}) { print < EOM for($i=0; $i<@commands; $i++) { print "\n"; print "\n"; print "\n"; print "\n"; } } else { for($i=0; $i<@commands; $i++) { if ($i%4 == 0) { print "\n"; } print "\n"; if ($i%4 == 3) { print "\n"; } } if ((scalar(@commands)-1)%4 != 3) { print "\n"; } } if (! @commands) { print "\n" } print <
$text{'commands_header'}
Name Command

{'value'}\">", "$commands[$i]->{'value'}$commands[$i]->{'values'}->[0]
{'value'}\">", "$commands[$i]->{'value'}
No commands found!

$text{'commands_new'} EOM print "

\n"; &footer("", $text{'commands_return'}); ### END of index.cgi ###. netsaint/edit_command.cgi0100755000076400000000000000557307126637347014374 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 26.12.1999 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $whatfailed=$text{'command_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'host_config'}); @commands=&find_struct('command', \@conf); $command=0; foreach $c (@commands) { if ($c->{'value'} eq $in{'name'}) { $command=$c; break; } } if ($command) { $header=&text('command_header', $command->{'value'}); $title=$text{'command_title_edit'}; } else { $header=$text{'command_create'}; $title=$text{'command_title_create'}; } &header($title, "", "command", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); print <
EOM if ($command) { print ""; } else { print ""; } print <
$header
$text{'name'}
$text{'command_command'}
EOM if ($command) { print "\n"; print ""; } else { print ""; } print "

\n"; &footer("list_commands.cgi", $text{'command_return'}); ### END of edit_command.cgi ###. netsaint/edit_service.cgi0100755000076400000000000002105607126637347014410 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999/2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 27.12.1999 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $whatfailed=$text{'service_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'host_config'}); @services=&find_struct('service', \@conf); $service=0; foreach $h (@services) { if (($h->{'value'} eq $in{'host'}) && ($h->{'values'}->[0] eq $in{'name'})) { $service=$h; last; } } if ($service) { $header=&text('service_header', $service->{'values'}->[0], $service->{'value'}); $title=$text{'service_title_edit'}; } else { $header=$text{'service_create'}; $title=$text{'service_title_create'}; } &header($title, "", "service", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); print <
EOM if ($service) { print ""; } else { print < EOM } print < EOM @parsedcommand=split(/!/, $service->{'values'}->[12]); $commandfound=0; foreach $c (@commands) { $commandfound++ if ($c->{'value'} eq $parsedcommand[0]); } if ($commandfound) { $vanilla=" CHECKED"; } else { $nvanilla=" CHECKED"; $rawcommand=$service->{'values'}->[12]; } print <
$header
$text{'service_description'} $text{'service_check_period'} $text{'service_max_attempts'}
$text{'service_notification'}
$text{'service_not_period'}
$text{'service_not_interval'}
$text{'service_not_recovery'} $text{'yes'} $text{'no'}
$text{'service_not_crit'} $text{'yes'} $text{'no'}
$text{'service_not_warn'} $text{'yes'} $text{'no'}
$text{'service_check_interval'} $text{'service_retry_interval'}
$text{'service_eventhandler'} $text{'service_contactgroups'}
$text{'service_command'}
$text{'service_vanilla_command'}
$text{'service_vanilla_arguments'}
$text{'service_vanilla_args_cmnt'}
$text{'service_raw_command'}
EOM if ($service) { print "\n"; print ""; } else { print ""; } print "

\n"; &footer("edit_host.cgi?name=$in{'host'}", &text('service_return', $in{'host'})); ### END of edit_service.cgi ###. netsaint/list_timeperiods.cgi0100755000076400000000000000535707126637347015330 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 28.12.1999 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $whatfailed=$text{'timeperiods_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'host_config'}); @timeperiods=&find_struct('timeperiod', \@conf); &header($text{'timeperiods_title'}, "", "timeperiods", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); # foreach $l (@timeperiods) { # print "\n
$l->{'name'}::$l->{'value'}::$l->{'line'}"; # } if ($config{'sort_timeperiods'}) { @timeperiods = sort { $a->{'value'} cmp $b->{'value'} } @timeperiods; } # Just show names print <
$text{'timeperiods_timeperiods'}
EOM for($i=0; $i<@timeperiods; $i++) { if ($i%4 == 0) { print "\n"; } print "\n"; if ($i%4 == 3) { print "\n"; } } if ((scalar(@timeperiods)-1)%4 != 3) { print "\n"; } if (! @timeperiods) { print "\n" } print <
{'value'}\">", "$timeperiods[$i]->{'value'}
No timeperiods found!
$text{'timeperiods_new'} EOM print "
\n"; &footer("", $text{'timeperiods_return'}); ### END of list_timeperiods.cgi ###.netsaint/edit_timeperiod.cgi0100755000076400000000000001146307126637347015112 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999-2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 28.12.1999 $whatfailed=$text{'timeperiod_error'}; require './netsaint-lib.pl'; @conf=&parse_config($config{'host_config'}); @timeperiods=&find_struct('timeperiod', \@conf); $timeperiod=0; foreach $h (@timeperiods) { if ($h->{'value'} eq $in{'name'}) { $timeperiod=$h; break; } } if ($timeperiod) { $header=&text('timeperiod_header', $timeperiod->{'value'}); $title=$text{'timeperiod_title_edit'}; } else { $header=$text{'timeperiod_create'}; $title=$text{'timeperiod_title_create'}; } &header($title, "", "timeperiod", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); $header=&text('timeperiod_header', $timeperiod->{'value'}); print <
EOM if ($timeperiod) { print ""; } else { print ""; } print <
$header
$text{'name'}
$text{'timeperiod_alias'}
$text{'timeperiod_sunday'}
$text{'timeperiod_one_per_line'}
$text{'timeperiod_monday'}
$text{'timeperiod_tuesday'}
$text{'timeperiod_one_per_line'}
$text{'timeperiod_wednesday'}
$text{'timeperiod_thursday'}
$text{'timeperiod_one_per_line'}
$text{'timeperiod_friday'}
$text{'timeperiod_saturday'}
$text{'timeperiod_one_per_line'}
$text{'timeperiod_desc'}
EOM if ($timeperiod) { print "\n"; print ""; } else { print ""; } print "

\n"; &footer("list_timeperiods.cgi", $text{'timeperiod_return'}); ### END of edit_timeperiod.cgi ###. netsaint/save_files.cgi0100755000076400000000000000534307126637347014064 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 29.12.1999 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $access{'files'} || &error($text{'efiles_notallowed'}); $whatfailed=$text{'sfiles_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'main_config'}); $cfile=&read_file_lines($config{'main_config'}); if (!$in{'log'}) { &error(&text('sfiles_nofile', "log")) } $tmp=&find_name('log_file', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "log_file", $in{'log'}); } else { push(@{$cfile}, join('=', "log_file", $in{'log'})); } if (!$in{'hostcfg'}) { &error(&text('sfiles_nofile'), "host configuration") } $tmp=&find_name('cfg_file', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "cfg_file", $in{'hostcfg'}); } else { push(@{$cfile}, join('=', "cfg_file", $in{'hostcfg'})); } if (!$in{'status'}) { &error(&text('sfiles_nofile'), "status") } $tmp=&find_name('status_file', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "status_file", $in{'status'}); } else { push(@{$cfile}, join('=', "status_file", $in{'status'})); } if (!$in{'temp'}) { &error(&text('sfiles_nofile'), "temp") } $tmp=&find_name('temp_file', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "temp_file", $in{'temp'}); } else { push(@{$cfile}, join('=', "temp_file", $in{'temp'})); } if (!$in{'comm'}) { &error(&text('sfiles_nofile'), "command") } $tmp=&find_name('command_file', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "command_file", $in{'comm'}); } else { push(@{$cfile}, join('=', "command_file", $in{'comm'})); } &flush_file_lines(); &redirect("edit_files.cgi"); ### END of save_files.cgi ###. netsaint/save_logging.cgi0100755000076400000000000001074407126637347014411 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999/2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 09.01.2000 require './netsaint-lib.pl'; $access{'logging'} || &error($text{'log_notallowed'}); $whatfailed=$text{'slogging_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'main_config'}); $cfile=&read_file_lines($config{'main_config'}); if ($in{'loglevel'} !~ /^[12]$/) { &error(&text('slogging_invalid', $in{'loglevel'}, 'Log Level', '1 or 2')) } $tmp=&find_name('log_level', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "log_level", $in{'loglevel'}); } else { push(@{$cfile}, join('=', "log_level", $in{'loglevel'})); } if ($in{'usesyslog'} !~ /^[01]$/) { &error(&text('slogging_invalid', $in{'usesyslog'}, 'Syslog Facility', '0 or 1')) } $tmp=&find_name('use_syslog', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "use_syslog", $in{'usesyslog'}); } else { push(@{$cfile}, join('=', "use_syslog", $in{'usesyslog'})); } if ($in{'sysloglevel'} !~ /^[12]$/) { &error(&text('slogging_invalid', $in{'sysloglevel'}, 'Syslog Level', '1 or 2')) } $tmp=&find_name('syslog_level', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "syslog_level", $in{'sysloglevel'}); } else { push(@{$cfile}, join('=', "syslog_level", $in{'sysloglevel'})); } if ($in{'notifications'} !~ /^[01]$/) { &error(&text('slogging_invalid', $in{'notifications'}, 'Log Notifications', '0 or 1')) } $tmp=&find_name('log_notifications', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "log_notifications", $in{'notifications'}); } else { push(@{$cfile}, join('=', "log_notifications", $in{'notifications'})); } if ($in{'serviceretries'} !~ /^[01]$/) { &error(&text('slogging_invalid', $in{'serviceretries'}, 'Log service retries', '0 or 1')) } $tmp=&find_name('log_service_retries', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "log_service_retries", $in{'serviceretries'}); } else { push(@{$cfile}, join('=', "log_service_retries", $in{'serviceretries'})); } if ($in{'hostretries'} !~ /^[01]$/) { &error(&text('slogging_invalid', $in{'hostretries'}, 'Log host retries', '0 or 1')) } $tmp=&find_name('log_host_retries', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "log_host_retries", $in{'hostretries'}); } else { push(@{$cfile}, join('=', "log_host_retries", $in{'hostretries'})); } if ($in{'eventhandler'} !~ /^[01]$/) { &error(&text('slogging_invalid', $in{'eventhandler'}, 'Log even handlers', '0 or 1')) } $tmp=&find_name('log_event_handlers', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "log_event_handlers", $in{'eventhandler'}); } else { push(@{$cfile}, join('=', "log_event_handlers", $in{'event_handler'})); } if ($in{'logrotate'} !~ /^[nhdwm]$/) { &error(&text('slogging_invalid', $in{'logrotate'}, $text{'slogging_err_inv_logrotate'}, $text{'slogging_err_inv_logrotate2'})) } $tmp=&find_name('log_rotation_method', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "log_rotation_method", $in{'logrotate'}); } else { push(@{$cfile}, join('=', "log_rotation_method", $in{'logrotate'})); } if (!$in{'logrotarch'}) { &error(&text('slogging_invalid', $in{'logrotarch'}, $text{'slogging_err_logrotarch'}, $text{'slogging_err_logrotarch2'})) } $tmp=&find_name('log_archive_path', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "log_archive_path", $in{'logrotarch'}); } else { push(@{$cfile}, join('=', "log_archive_path", $in{'logrotarch'})); } &flush_file_lines(); &redirect("edit_logging.cgi"); ### END of save_logging.cgi ###. netsaint/save_misc.cgi0100755000076400000000000001323407126641342013701 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999/2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 09.01.2000 require './netsaint-lib.pl'; $access{'misc'} || &error($text{'misc_notallowed'}); $whatfailed=$text{'smisc_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'main_config'}); @hostconf=&parse_config($config{'host_config'}); $cfile=&read_file_lines($config{'main_config'}); if ($in{'sleeptime'} !~ /^\d+$/ ) { &error(&text('smisc_invalid', $in{'sleeptime'}, "Sleep time", "integer")) } $tmp=&find_name('sleep_time', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "sleep_time", $in{'sleeptime'}); } else { push(@{$cfile}, join('=', "sleep_time", $in{'sleeptime'})); } if ($in{'useil'}) { if ($in{'intervallength'} !~ /^\d+$/ ) { &error(&text('smisc_invalid', $in{'intervallength'}, "Interval length", "integer")) } $tmp=&find_name('interval_length', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "interval_length", $in{'intervallength'}); } else { push(@{$cfile}, join('=', "interval_length", $in{'intervallength'})); } } if ($in{'progmode'} !~ /^[as]$/) { &error(&text('smisc_invalid', $in{'progmode'}, $text{'smisc_err_progmode'}, $text{'smisc_err_progmode2'})) } $tmp=&find_name('program_mode', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "program_mode", $in{'progmode'}); } else { push(@{$cfile}, join('=', "program_mode", $in{'progmode'})); } if ($in{'aggressivechecks'} !~ /^[01]$/) { &error(&text('smisc_invalid', $in{'aggressivechecks'}, 'aggressive host checking', '0 or 1')) } $tmp=&find_name('use_agressive_host_checking', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "use_agressive_host_checking", $in{'aggressivechecks'}); } else { push(@{$cfile}, join('=', "use_agressive_host_checking", $in{'aggressivechecks'})); } if ($in{'intchkdelmeth'} !~ /^[dns]$/) { &error(&text('smisc_invalid', $in{'intchkdelmeth'}, $text{'smisc_err_inv_icdm'}, $text{'smisc_err_inv_icdm2'})) } $tmp=&find_name('inter_check_delay_method', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "inter_check_delay_method", $in{'intchkdelmeth'}); } else { push(@{$cfile}, join('=', "inter_check_delay_method", $in{'intchkdelmeth'})); } if (! $in{'servintleavsmart'}) { if ($in{'servintleavfact'} !~ /^\d+$/) { &error(&text('smisc_invalid', $in{'servintleavfact'}, $text{'smisc_err_inv_scilf'}, $text{'smisc_err_inv_scilf2'})) } } $tmp=&find_name('service_interleave_factor', \@conf); if ($tmp) { if ($in{'servintleavsmart'}) { $cfile->[$tmp->{'line'}]=join('=', "service_interleave_factor", "s"); } else { $cfile->[$tmp->{'line'}]=join('=', "service_interleave_factor", $in{'servintleavfact'}); } } else { if ($in{'servintleavsmart'}) { push(@{$cfile}, join('=', "service_interleave_factor", "s")); } else { push(@{$cfile}, join('=', "service_interleave_factor", $in{'servintleavfact'})); } } if ($in{'maxconcchk'} !~ /^\d+$/ ) { &error(&text('smisc_invalid', $in{'maxconcchk'}, $text{'smisc_err_inv_maxconcchk'}, $text{'smisc_err_inv_maxconcchk2'})) } $tmp=&find_name('max_concurrent_checks', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "max_concurrent_checks", $in{'maxconcchk'}); } else { push(@{$cfile}, join('=', "max_concurrent_checks", $in{'maxconcchk'})); } if ($in{'servreapfreq'} !~ /^\d+$/ ) { &error(&text('smisc_invalid', $in{'servreapfreq'}, $text{'smisc_err_inv_servreapfreq'}, $text{'smisc_err_inv_servreapfreq2'})) } $tmp=&find_name('service_reaper_frequency', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "service_reaper_frequency", $in{'servreapfreq'}); } else { push(@{$cfile}, join('=', "service_reaper_frequency", $in{'servreapfreq'})); } @commands=&find_struct('command', \@hostconf); $foundserveh=0; $foundhosteh=0; foreach $c (@commands) { if ($c->{'value'} eq $in{'globhosteh'}) { $foundhosteh++ } if ($c->{'value'} eq $in{'globserveh'}) { $foundserveh++ } } if (!$foundserveh && $in{'globserveh'}) { &error($text{'smisc_err_globserveh'}); } if (!$foundhosteh && $in{'globhosteh'}) { &error($text{'smisc_err_globhosteh'}); } $tmp=&find_name('global_host_event_handler', \@conf); if ($in{'globhosteh'}) { if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "global_host_event_handler", $in{'globhosteh'}); } else { push(@{$cfile}, join('=', "global_host_event_handler", $in{'globhosteh'})); } } $tmp=&find_name('global_service_event_handler', \@conf); if ($in{'globserveh'}) { if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "global_service_event_handler", $in{'globserveh'}); } else { push(@{$cfile}, join('=', "global_service_event_handler", $in{'globserveh'})); } } &flush_file_lines(); &redirect("edit_misc.cgi"); ### END of save_misc.cgi ###. netsaint/save_notifications.cgi0100755000076400000000000000446307126637347015635 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 29.12.1999 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $access{'not'} || &error($text{'ntfcs_notallowed'}); $whatfailed=$text{'sntfcs_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'main_config'}); $cfile=&read_file_lines($config{'main_config'}); if (!$in{'summary'}) { &error(&text('sntfcs_missing', "generic summary")) } $tmp=&find_name('generic_summary', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "generic_summary", $in{'summary'}); } else { push(@{$cfile}, join('=', "generic_summary", $in{'summary'})); } if (!$in{'pager'}) { &error(&text('sntfcs_missing', "pager")) } $tmp=&find_name('admin_pager', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "admin_pager", $in{'pager'}); } else { push(@{$cfile}, join('=', "admin_pager", $in{'pager'})); } if (!$in{'email'}) { &error(&text('sntfcs_missing', "admin email address")) } $tmp=&find_name('admin_email', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "admin_email", $in{'email'}); } else { push(@{$cfile}, join('=', "admin_email", $in{'email'})); } &flush_file_lines(); &redirect("edit_notifications.cgi"); ### END of save_notifications.cgi ###. netsaint/save_cgi.cgi0100755000076400000000000001172207126642711013511 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999/2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 09.01.2000 $whatfailed=$text{'scgi_error'}; require './netsaint-lib.pl'; $access{'cgi'} || &error($text{'cgi_notallowed'}); @conf=&parse_config($config{'cgi_config'}); $cfile=&read_file_lines($config{'cgi_config'}); if (!$in{'mainconfig'}) { &error($text{'scgi_nomainfile'}) } $tmp=&find_name('main_config_file', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "main_config_file", $in{'mainconfig'}); } else { push(@{$cfile}, join('=', "main_config_file", $in{'mainconfig'})); } if (!$in{'physicalhtmlpath'}) { &error(&text('scgi_inv_dir', $in{'physicalhtmlpath'}, "physical HTML path")) } $tmp=&find_name('physical_html_path', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "physical_html_path", $in{'physicalhtmlpath'}); } else { push(@{$cfile}, join('=', "physical_html_path", $in{'physicalhtmlpath'})); } if (!$in{'urlhtmlpath'}) { &error(&text('scgi_inv_dir', $in{'urlhtmlpath'}, "URL HTML path")) } $tmp=&find_name('url_html_path', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "url_html_path", $in{'urlhtmlpath'}); } else { push(@{$cfile}, join('=', "url_html_path", $in{'urlhtmlpath'})); } if (!$in{'processcheckcommand'}) { &error(&text('scgi_inv_dir', $in{'processcheckcommand'}, $text{'scgi_procchkcomm'})) } $tmp=&find_name('process_check_command', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "process_check_command", $in{'processcheckcommand'}); } else { push(@{$cfile}, join('=', "process_check_command", $in{'processcheckcommand'})); } if (!$in{'urlcgibinpath'}) { &error(&text('scgi_inv_dir', $in{'urlcgibinpath'}, "URL CGI path")) } $tmp=&find_name('url_cgibin_path', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "url_cgibin_path", $in{'urlcgibinpath'}); } else { push(@{$cfile}, join('=', "url_cgibin_path", $in{'urlcgibinpath'})); } if ($in{'suppalwin'} !~ /^[01]$/ ) { &error(&text('scgi_invalid', $in{'suppalwin'}, $text{'scgi_suppalwin'}, $text{'scgi_0or1'})) } $tmp=&find_name('suppress_alert_window', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "suppress_alert_window", $in{'suppalwin'}); } else { push(@{$cfile}, join('=', "suppress_alert_window", $in{'suppalwin'})); } if ($in{'refreshrate'} !~ /^\d+$/) { &error(&text('scgi_invalid', $in{'refreshrate'}, $text{'scgi_refresh_rate'}, $text{'scgi_number'})) } $tmp=&find_name('refresh_rate', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "refresh_rate", $in{'refreshrate'}); } else { push(@{$cfile}, join('=', "refresh_rate", $in{'refreshrate'})); } if ($in{'tablefgcolor'} !~ /^#[0123456789abcdefABCDEF]{6}$/) { &error(&text('scgi_invalid', $in{'tablefgcolor'}, $text{'scgi_table_fg_color'}, $text{'scgi_hexcolor'})) } $tmp=&find_name('html_table_fg_color', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "html_table_fg_color", $in{'tablefgcolor'}); } else { push(@{$cfile}, join('=', "html_table_fg_color", $in{'tablefgcolor'})); } if ($in{'tablebgcolor'} !~ /^#[0123456789abcdefABCDEF]{6}$/) { &error(&text('scgi_invalid', $in{'tablebgcolor'}, $text{'scgi_table_bg_color'}, $text{'scgi_hexcolor'})) } $tmp=&find_name('html_table_bg_color', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "html_table_bg_color", $in{'tablebgcolor'}); } else { push(@{$cfile}, join('=', "html_table_bg_color", $in{'tablebgcolor'})); } if ($in{'tablebgevencolor'} !~ /^#[0123456789abcdefABCDEF]{6}$/) { &error(&text('scgi_invalid', $in{'tablebgevencolor'}, $text{'scgi_table_bg_even_color'}, $text{'scgi_hexcolor'})) } $tmp=&find_name('html_table_bg_even_color', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "html_table_bg_even_color", $in{'tablebgevencolor'}); } else { push(@{$cfile}, join('=', "html_table_bg_even_color", $in{'tablebgevencolor'})); } if ($in{'tablebgoddcolor'} !~ /^#[0123456789abcdefABCDEF]{6}$/) { &error(&text('scgi_invalid', $in{'tablebgoddcolor'}, $text{'scgi_table_bg_odd_color'}, $text{'scgi_hexcolor'})) } $tmp=&find_name('html_table_bg_odd_color', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "html_table_bg_odd_color", $in{'tablebgoddcolor'}); } else { push(@{$cfile}, join('=', "html_table_bg_odd_color", $in{'tablebgoddcolor'})); } &flush_file_lines(); &redirect("edit_cgi.cgi"); ### END of save_cgi.cgi ###.netsaint/save_host.cgi0100755000076400000000000002162707126644423013733 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999/2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 09.01.2000 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $whatfailed=$text{'shost_error'}; @conf=&parse_config($config{'host_config'}); @cgiconf=&parse_config($config{'cgi_config'}); @hosts=&find_struct('host', \@conf); @cgihosts=&find_struct('hostextinfo', \@cgiconf); $host=0; foreach $h (@hosts) { if ($h->{'value'} eq $in{'name'}) { $host=$h; last; } } $cgihost=0; foreach $h (@cgihosts) { if ($h->{'value'} eq $in{'name'}) { $cgihost=$h; last; } } if ($host) { if ($in{'delete'}) { $access{'hostdelete'} || &error($text{'shost_notallowed_delete'}); } else { $access{'hostedit'} || &error($text{'shost_notallowed_edit'}); } } else { if ($in{'new'}) { $access{'hostcreate'} || &error($text{'shost_notallowed_create'}); } } if ($host && $in{'new'}) { # The host already exists and we try to create another one with its name &error(&text("shost_already_exists", $in{'name'})); } $in{'hostalias'} || &error($text{'shost_noalias'}); $in{'address'} || &error($text{'shost_noaddress'}); if ($in{'maxattempts'} !~ /^\d+$/) { &error($text{'shost_maxattempts_err'}); } $foundhost=0; foreach $h (@hosts) { if ($h->{'value'} eq $in{'parenthost'}) { $foundhost++ } } if (!$foundhost && $in{'parenthost'}) { &error($text{'shost_parenthost_err'}); } @commands=&find_struct('command', \@conf); $foundchkc=0; $foundeh=0; foreach $c (@commands) { if ($c->{'value'} eq $in{'checkcommand'}) { $foundchkc++ } if ($c->{'value'} eq $in{'eventhandler'}) { $foundeh++ } } if (!$foundchkc && $in{'checkcommand'}) { &error($text{'shost_checkcommand_err'}); } if (!$foundeh && $in{'eventhandler'}) { &error($text{'shost_eventhandler_err'}); } @groups=split(/\0/, $in{'groups'}); if (!scalar(@groups)) { &error($text{'shost_nogroup'}); } @periods=&find_struct('timeperiod', \@conf); $found=0; foreach $p (@periods) { if ($p->{'value'} eq $in{'notperiod'}) { $found++; } } if (!$found && $in{'notperiod'}) { &error($text{'shost_notperiod_err'}); } if ($in{'notinterval'} !~ /^\d+$/) { &error($text{'shost_interval_err'}); } if ($in{'notrecovery'} !~ /^[01]$/) { &error(&text('shost_invalid', $in{'notrecovery'}, 'recovery notification', '0 or 1')) } if ($in{'notdown'} !~ /^[01]$/) { &error(&text('shost_invalid', $in{'notdown'}, 'down notification', '0 or 1')) } if ($in{'notunreachable'} !~ /^[01]$/) { &error(&text('shost_invalid', $in{'notunreachable'}, 'unreachable notification', '0 or 1')) } $cfile=&read_file_lines($config{'host_config'}); $cgifile=&read_file_lines($config{'cgi_config'}); local $ph = $in{'parenthost'} ? $in{'parenthost'} : ""; local $hcc = $in{'checkcommand'} ? $in{'checkcommand'} : ""; local $eh = $in{'eventhandler'} ? $in{'eventhandler'} : ""; local $tp = $in{'notperiod'} ? $in{'notperiod'} : ""; if ($host) { if ($in{'delete'}) { # we delete an existing host splice(@{$cfile}, $host->{'line'}, 1); &flush_file_lines(); @conf=&parse_config($config{'host_config'}); if ($cgihost) { splice(@{$cgifile}, $cgihost->{'line'}, 1); &flush_file_lines(); @cgiconf=&parse_config($config{'cgi_config'}); } } else { # the host exists, we change it $cfile->[$host->{'line'}]=join('=', "host[$host->{'value'}]", join(';', $in{'hostalias'}, $in{'address'}, $ph, $hcc, $in{'maxattempts'}, $in{'notinterval'}, $tp, $in{'notrecovery'}, $in{'notdown'}, $in{'notunreachable'}, $eh ) ); } } else { if ($in{'delete'}) { &error(&text({'shost_notfound'}, $in{'name'})); } else { push(@{$cfile}, join('=', "host[$in{'name'}]", join(';', $in{'hostalias'}, $in{'address'}, $ph, $hcc, $in{'maxattempts'}, $in{'notinterval'}, $tp, $in{'notrecovery'}, $in{'notdown'}, $in{'notunreachable'}, $eh ) ) ); } } if ($cgihost) { if ($in{'delete'}) { # we delete an existing host splice(@{$cgifile}, $cgihost->{'line'}, 1); &flush_file_lines(); @cgiconf=&parse_config($config{'cgi_config'}); } else { # the host exists, we change it $cgifile->[$cgihost->{'line'}]=join('=', "hostextinfo[$cgihost->{'value'}]", join(';', $in{'notesurl'}, $in{'imageicon'}, $in{'imagevrml'}, $in{'imagegd'}, $in{'alttag'} ) ); } } else { if (!$in{'delete'}) { push(@{$cgifile}, join('=', "hostextinfo[$in{'name'}]", join(';', $in{'notesurl'}, $in{'imageicon'}, $in{'imagevrml'}, $in{'imagegd'}, $in{'alttag'} ) ) ); } } local @hostgroups=&find_struct('hostgroup', \@conf); if ($in{'delete'} && $host) { foreach $g (@hostgroups) { local(@lg); @lg=split(/,/, $g->{'values'}->[2]); if (&indexof($host->{'value'}, @lg) >= 0) { splice(@lg, &indexof($host->{'value'}, @lg), 1); } # we principally write to the file, although if there are no changes, # this is easier and takes not much time, because this is a # RAM-only operation (because auf read_file_line/flush... functions $cfile->[$g->{'line'}]=join('=', "hostgroup[$g->{'value'}]", join(';', $g->{'values'}->[0], $g->{'values'}->[1], join(',', @lg) ) ); } } else { foreach $g (@hostgroups) { local(@lg); @lg=split(/,/, $g->{'values'}->[2]); if (&indexof($in{'name'}, @lg) < 0) { if (&indexof($g->{'value'}, @groups) >= 0) { # the group is selected but the host not yet in this hostgroup push(@lg, $in{'name'}); } # otherwise the group is not selected and the host is not in the hostgroup } else { if (&indexof($g->{'value'}, @groups) < 0) { # the host is in the hostgroup, but no longer selected, # so we remove the host from the hostgroup splice(@lg, &indexof($in{'name'}, @lg), 1); } # otherwise the group is selected and the host already member of the hostrgroup } # we principally write to the file, although if there are no changes, # this is easier and takes not much time, because this is a # RAM-only operation (because auf read_file_line/flush... functions $cfile->[$g->{'line'}]=join('=', "hostgroup[$g->{'value'}]", join(';', $g->{'values'}->[0], $g->{'values'}->[1], join(',', @lg) ) ); } } # end else (no delete) &flush_file_lines(); if ($in{'delete'}) { &redirect("list_hosts.cgi"); } else { &redirect("edit_host.cgi?name=$in{'name'}"); } ### END of save_host.cgi ###.netsaint/save_hostgroup.cgi0100755000076400000000000000751407126637347015016 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999/2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 09.01.2000 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $whatfailed=$text{'shostgroup_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'host_config'}); @hostgroups=&find_struct('hostgroup', \@conf); $hostgroup=0; foreach $h (@hostgroups) { if ($h->{'value'} eq $in{'name'}) { $hostgroup=$h; last; } } if ($hostgroup) { if ($in{'delete'}) { $access{'hostgroupdelete'} || &error($text{'shostgroup_notallowed_delete'}); } else { $access{'hostgroupedit'} || &error($text{'shostgroup_notallowed_edit'}); } } else { if ($in{'new'}) { $access{'hostgroupcreate'} || &error($text{'shostgroup_notallowed_create'}); } } if ($hostgroup && $in{'new'}) { # The hostgroup already exists and we try to create another one with its name &error(&text("shostgroup_already_exists", $in{'name'})); } $in{'hostgroupalias'} || &error($text{'shostgroup_noalias'}); @hosts=&find_struct('host', \@conf); @chosts=split(/\0/, $in{'members'}); foreach $h (@hosts) { if (&indexof($h->{'value'}, @chosts) < 0) { $mgroups=0; foreach $g (@hostgroups) { next if ($g->{'value'} eq $in{'name'}); local(@lg); @lg=split(/,/, $g->{'values'}->[2]); if (&indexof($h->{'value'}, @lg) >= 0) { $mgroups++ } } if (!$mgroups) { &error(&text('shostgroup_cannotremove', $h->{'value'})) } } } @cgroups=split(/\0/, $in{'contactgroups'}); $cfile=&read_file_lines($config{'host_config'}); if ($hostgroup) { # the hostgroup exists, we change it if ($in{'delete'}) { # we delete an existing host splice(@{$cfile}, $hostgroup->{'line'}, 1); &flush_file_lines(); @conf=&parse_config($config{'host_config'}); } else { # we save an existing host $cfile->[$hostgroup->{'line'}]=join('=', "hostgroup[$hostgroup->{'value'}]", join(';', $in{'hostgroupalias'}, join(',', @cgroups), join(',', @chosts) ) ); } } else { if ($in{'delete'}) { &error(&text({'shostgroup_notfound'}, $in{'name'})); } else { push(@{$cfile}, join('=', "hostgroup[$in{'name'}]", join(';', $in{'hostgroupalias'}, join(',', @cgroups), join(',', @chosts) ) ) ); } } &flush_file_lines(); if ($in{'delete'}) { &redirect("list_hosts.cgi"); } else { &redirect("edit_hostgroup.cgi?name=$in{'name'}"); } ### END of save_hostgroup.cgi ###. netsaint/save_contact.cgi0100755000076400000000000001345207126637347014415 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999/2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 09.01.2000 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $whatfailed=$text{'scontact_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'host_config'}); @contacts=&find_struct('contact', \@conf); $contact=0; foreach $c (@contacts) { if ($c->{'value'} eq $in{'name'}) { $contact=$c; last; } } if ($contact) { if ($in{'delete'}) { $access{'contactdelete'} || &error($text{'scontact_notallowed_delete'}); } else { $access{'contactedit'} || &error($text{'scontact_notallowed_edit'}); } } else { if ($in{'new'}) { $access{'contactcreate'} || &error($text{'scontact_notallowed_create'}); } } if ($contact && $in{'new'}) { # The host already exists and we try to create another one with its name &error(&text("scontact_already_exists", $in{'name'})); } $in{'alias'} || &error(&text('scontact_missing', 'contact alias')); $in{'email'} || &error(&text('scontact_missing', 'contact email')); if ($in{'notservrec'} !~ /^[01]$/) { &error(&text('scontact_invalid', $in{'notserv'}, 'notification on service recovery')) } if ($in{'nothostrec'} !~ /^[01]$/) { &error(&text('scontact_invalid', $in{'nothostrec'}, 'notification on host recovery')) } if ($in{'notservcrit'} !~ /^[01]$/) { &error(&text('scontact_invalid', $in{'notservcrit'}, 'notification on critical service')) } if ($in{'nothostdown'} !~ /^[01]$/) { &error(&text('scontact_invalid', $in{'nothostdown'}, 'notification on host down')) } if ($in{'notservwarn'} !~ /^[01]$/) { &error(&text('scontact_invalid', $in{'notservwarn'}, 'service warning')) } if ($in{'nothostunre'} !~ /^[01]$/) { &error(&text('scontact_invalid', $in{'nothostunre'}, 'notification on host unreachable')) } @commands=&find_struct('command', \@conf); @servcomms=split(/\0/, $in{'servcomm'}); @hostcomms=split(/\0/, $in{'hostcomm'}); $cfile=&read_file_lines($config{'host_config'}); if ($contact) { # the hostgroup exists, we change it if ($in{'delete'}) { # we delete an existing contact splice(@{$cfile}, $contact->{'line'}, 1); &flush_file_lines(); @conf=&parse_config($config{'host_config'}); } else { $cfile->[$contact->{'line'}]=join('=', "contact[$contact->{'value'}]", join(';', $in{'alias'}, $in{'svcperiod'}, $in{'hostperiod'}, $in{'notservrec'}, $in{'notservcrit'}, $in{'notservwarn'}, $in{'nothostrec'}, $in{'nothostdown'}, $in{'nothostunre'}, join(',', @servcomms), join(',', @hostcomms), $in{'email'}, $in{'pager'} ) ); } } else { if ($in{'delete'}) { &error(&text({'scontact_notfound'}, $in{'name'})); } else { push(@{$cfile}, join('=', "contact[$in{'name'}]", join(';', $in{'alias'}, $in{'svcperiod'}, $in{'hostperiod'}, $in{'notservrec'}, $in{'notservcrit'}, $in{'notservwarn'}, $in{'nothostrec'}, $in{'nothostdown'}, $in{'nothostunre'}, join(',', @servcomms), join(',', @hostcomms), $in{'email'}, $in{'pager'} ) ) ); } } @cgroups=&find_struct('contactgroup', \@conf); if ($in{'delete'} && $contact) { foreach $c (@cgroups) { local(@lg); @lg=split(/,/, $c->{'values'}->[1]); if (&indexof($contact->{'value'}, @lg) >= 0) { splice(@lg, &indexof($contact->{'value'}, @lg), 1); $cfile->[$c->{'line'}]=join('=', "contactgroup[$c->{'value'}]", join(';', $c->{'values'}->[0], join(',', @lg) ) ); } } } &flush_file_lines(); if ($in{'delete'}) { &redirect("list_contacts.cgi"); } else { &redirect("edit_contact.cgi?name=$in{'name'}"); } ### END of save_contact.cgi ###. netsaint/save_contactgroup.cgi0100755000076400000000000000740707126637347015475 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999/2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 12.01.2000 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $whatfailed=$text{'scontactgroup_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'host_config'}); @contactgroups=&find_struct('contactgroup', \@conf); $contactgroup=0; foreach $h (@contactgroups) { if ($h->{'value'} eq $in{'name'}) { $contactgroup=$h; last; } } if ($contactgroup) { if ($in{'delete'}) { $access{'contactgroupdelete'} || &error($text{'scontactgroup_notallowed_delete'}); } else { $access{'contactgroupedit'} || &error($text{'scontactgroup_notallowed_edit'}); } } else { if ($in{'new'}) { $access{'contactgroupcreate'} || &error($text{'scontactgroup_notallowed_create'}); } } if ($contactgroup && $in{'new'}) { # The contactgroup already exists and we try to create another one with its name &error(&text("scontactgroup_already_exists", $in{'name'})); } $in{'contactgroupalias'} || &error($text{'scontactgroup_noalias'}); ## @contacts=&find_struct('contact', \@conf); @ccontacts=split(/\0/, $in{'members'}); foreach $h (@contacts) { if (&indexof($h->{'value'}, @ccontacts) < 0) { $mgroups=0; foreach $g (@contactgroups) { next if ($g->{'value'} eq $in{'name'}); local(@lg); @lg=split(/,/, $g->{'values'}->[1]); if (&indexof($h->{'value'}, @lg) >= 0) { $mgroups++ } } if (!$mgroups) { &error(&text('scontactgroup_cannotremove', $h->{'value'})) } } } $cfile=&read_file_lines($config{'host_config'}); if ($contactgroup) { # the contactgroup exists, we change it if ($in{'delete'}) { # we delete an existing contact splice(@{$cfile}, $contactgroup->{'line'}, 1); &flush_file_lines(); @conf=&parse_config($config{'host_config'}); } else { $cfile->[$contactgroup->{'line'}]=join('=', "contactgroup[$contactgroup->{'value'}]", join(';', $in{'contactgroupalias'}, join(',', @ccontacts) ) ); } } else { if ($in{'delete'}) { &error(&text({'scontactgroup_notfound'}, $in{'name'})); } else { push(@{$cfile}, join('=', "contactgroup[$in{'name'}]", join(';', $in{'contactgroupalias'}, join(',', @ccontacts) ) ) ); } } &flush_file_lines(); if ($in{'delete'}) { &redirect("list_contacts.cgi"); } else { &redirect("edit_contactgroup.cgi?name=$in{'name'}"); } ### END of save_contactgroup.cgi ###. netsaint/save_command.cgi0100755000076400000000000000464007126637347014377 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999/2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 09.01.2000 $whatfailed=$text{'scommand_error'}; require './netsaint-lib.pl'; @conf=&parse_config($config{'host_config'}); @commands=&find_struct('command', \@conf); $command=0; foreach $c (@commands) { if ($c->{'value'} eq $in{'name'}) { $command=$c; last; } } if ($command && $in{'new'}) { # The host already exists and we try to create another one with its name &error(&text("scommand_already_exists", $in{'name'})); } if ($command) { if ($in{'delete'}) { $access{'commanddelete'} || &error($text{'scommand_notallowed_delete'}); } else { $access{'commandedit'} || &error($text{'scommand_notallowed_edit'}); } } else { if ($in{'new'}) { $access{'commandcreate'} || &error($text{'scommand_notallowed_create'}); } } $cfile=&read_file_lines($config{'host_config'}); if ($command) { # the hostgroup exists, we change it if ($in{'delete'}) { # we delete an existing contact splice(@{$cfile}, $command->{'line'}, 1); &flush_file_lines(); @conf=&parse_config($config{'host_config'}); } else { $cfile->[$command->{'line'}]=join('=', "command[$command->{'value'}]", $in{'command'} ); } } else { if ($in{'delete'}) { &error(&text({'scommand_notfound'}, $in{'name'})); } else { push(@{$cfile}, join('=', "command[$in{'name'}]", $in{'command'} ) ); } } &flush_file_lines(); if ($in{'delete'}) { &redirect("list_commands.cgi"); } else { &redirect("edit_command.cgi?name=$in{'name'}"); } ### END of save_command.cgi ###. netsaint/save_timeperiod.cgi0100755000076400000000000000670207126637347015123 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999-2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 12.01.2000 $whatfailed=$text{'stimeperiod_error'}; require './netsaint-lib.pl'; @conf=&parse_config($config{'host_config'}); @timeperiods=&find_struct('timeperiod', \@conf); $timeperiod=0; foreach $t (@timeperiods) { if ($t->{'value'} eq $in{'name'}) { $timeperiod=$t; last; } } if ($timeperiod) { if ($in{'delete'}) { $access{'timeperioddelete'} || &error($text{'stimeperiod_notallowed_delete'}); } else { $access{'timeperiodedit'} || &error($text{'stimeperiod_notallowed_edit'}); } } else { if ($in{'new'}) { $access{'timeperiodcreate'} || &error($text{'stimeperiod_notallowed_create'}); } } if ($timeperiod && $in{'new'}) { # The host already exists and we try to create another one with its name &error(&text("stimeperiod_already_exists", $in{'name'})); } $in{'timeperiodalias'} || &error($text{'shost_noalias'}); @weekdays=("sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"); foreach $d (@weekdays) { chomp $in{$d}; @{$d}=split(/\s+/, $in{$d}); foreach $wd (@{$d}) { if ($wd !~ /^\d{1,2}:\d{1,2}-\d{1,2}:\d{1,2}$/) { &error(&text('stimeperiod_invalid', $wd)); } } } $cfile=&read_file_lines($config{'host_config'}); if ($timeperiod) { # the timeperiod exists, we change it $cfile->[$timeperiod->{'line'}]=join('=', "timeperiod[$timeperiod->{'value'}]", join(';', $in{'timeperiodalias'}, join(',', @sunday), join(',', @monday), join(',', @tuesday), join(',', @wednesday), join(',', @thursday), join(',', @friday), join(',', @saturday), ) ); } else { push(@{$cfile}, join('=', "timeperiod[$in{'name'}]", join(';', $in{'timeperiodalias'}, join(',', @sunday), join(',', @monday), join(',', @tuesday), join(',', @wednesday), join(',', @thursday), join(',', @friday), join(',', @saturday), ) ) ); } &flush_file_lines(); &redirect("edit_timeperiod.cgi?name=$in{'name'}"); ### END of save_timeperiod.cgi ###. netsaint/save_service.cgi0100755000076400000000000001310307126637347014413 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999/2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 12.01.2000 ####################### # Configuration # ####################### require './netsaint-lib.pl'; $whatfailed=$text{'sservice_error'}; (-e $config{'main_config'}) || &error(&text('index_merr', $config{'main_config'}, "/config.cgi?$module_name")); (-e $config{'host_config'}) || &error(&text('index_herr', $config{'host_config'}, "/config.cgi?$module_name")); (-e $config{'cgi_config'}) || &error(&text('index_cerr', $config{'cgi_config'}, "/config.cgi?$module_name")); @conf=&parse_config($config{'host_config'}); @services=&find_struct('service', \@conf); $service=0; foreach $s (@services) { if (($s->{'value'} eq $in{'host'}) && ($s->{'values'}->[0] eq $in{'name'})) { $service=$s; last; } } if ($service) { if ($in{'delete'}) { $access{'servicedelete'} || &error($text{'sservice_notallowed_delete'}); } else { $access{'serviceedit'} || &error($text{'sservice_notallowed_edit'}); } } else { if ($in{'new'}) { $access{'servicecreate'} || &error($text{'sservice_notallowed_create'}); } } if ($service && $in{'new'}) { # The host already exists and we try to create another one with its name &error(&text("sservice_already_exists", $in{'name'})); } $in{'name'} || &error($text{'sservice_nodesc'}); if ($in{'notinterval'} !~ /^\d+$/) { &error(&text('sservice_miss_inv', $in{'notinterval'}, 'Notification interval')) } if ($in{'maxattempts'} !~ /^\d+$/) { &error(&text('sservice_miss_inv', $in{'maxattempts'}, 'max attempts')) } if ($in{'checkinterval'} !~ /^\d+$/) { &error(&text('sservice_miss_inv', $in{'checkinterval'}, 'check interval')) } if ($in{'retryinterval'} !~ /^\d+$/) { &error(&text('sservice_miss_inv', $in{'retryinterval'}, 'retry interval')) } if ($in{'notrecovery'} !~ /^[01]$/) { &error(&text('sservice_miss_inv', $in{'notrecovery'}, 'recovery notification (must be 0 or 1)')) } if ($in{'notcrit'} !~ /^[01]$/) { &error(&text('sservice_miss_inv', $in{'notcrit'}, 'critical notification (must be 0 or 1)')) } if ($in{'notwarn'} !~ /^[01]$/) { &error(&text('sservice_miss_inv', $in{'notwarn'}, 'warning notification (must be 0 or 1)')) } if ($in{'vanilla'} && !$in{'vanillacommand'}) { &error($text{'sservice_vanilla'}) } if (!$in{'vanilla'} && !$in{'rawcommand'}) { &error($text{'sservice_rawcommand'}) } if ($in{'vanilla'}) { $checkcommand=join("!", $in{'vanillacommand'}, split(/\s+/, $in{'vanillaarguments'})); } else { $checkcommand=$in{'rawcommand'}; } @cgroups=split(/\0/, $in{'contactgroups'}); $cfile=&read_file_lines($config{'host_config'}); if ($service) { # the service exists, we change it if ($in{'delete'}) { # we delete an existing contact splice(@{$cfile}, $service->{'line'}, 1); &flush_file_lines(); @conf=&parse_config($config{'host_config'}); } else { $cfile->[$service->{'line'}]=join('=', "service[$service->{'value'}]", join(';', $in{'name'}, $in{'checkperiod'}, $in{'maxattempts'}, $in{'checkinterval'}, $in{'retryinterval'}, join(',', @cgroups), $in{'notinterval'}, $in{'notperiod'}, $in{'notrecovery'}, $in{'notcrit'}, $in{'notwarn'}, $in{'eventhandler'}, $checkcommand ) ); } } else { if ($in{'delete'}) { &error(&text({'sservice_notfound'}, $in{'name'})); } else { push(@{$cfile}, join('=', "service[$in{'host'}]", join(';', $in{'name'}, $in{'checkperiod'}, $in{'maxattempts'}, $in{'checkinterval'}, $in{'retryinterval'}, join(',', @cgroups), $in{'notinterval'}, $in{'notperiod'}, $in{'notrecovery'}, $in{'notcrit'}, $in{'notwarn'}, $in{'eventhandler'}, $checkcommand ) ) ); } } &flush_file_lines(); if ($in{'delete'}) { &redirect("edit_host.cgi?name=$in{'host'}"); } else { &redirect("edit_service.cgi?name=$in{'name'}&host=$in{'host'}"); } ### END of save_service.cgi ###. netsaint/help/0040755000076400000000000000000007112060135012157 5ustar timrootnetsaint/help/intro.html0100644000076400000000000000024307037410562014205 0ustar timroot
Introduction to NetSaint Configuration
The NetSaint Configuration offers a graphical configuration interface with the Webmin Look&Feel


netsaint/help/cgi.html0100644000076400000000000001760707112057316013626 0ustar timroot
NetSaint Configuration

CGI Configuration

Main configuration file location
URL HTML path
URL CGI-BIN path
Process check command
Alert window suppression
CGI refresh rate
Custom HTML table colors


Main Configuration File Location

Format: main_config_file=<file_name>
Example: main_config_file=/usr/local/netsaint/etc/netsaint.cfg

This specifies the location of your main configuration file. The CGIs need to know where to find this file in order to get information about configuration information, current host and service status, etc.

Physical HTML Path

Format: physical_html_path=<path>
Example: physical_html_path=/usr/local/netsaint/share

This is the physical path where the HTML files for NetSaint are kept on your workstation or server. NetSaint assumes that the documentation and images files (used by the CGIs) are stored in subdirectories called docs/ and images/, respectively.

URL HTML Path

Format: url_html_path=<path>
Example: url_html_path=/netsaint

If, when accessing NetSaint via a web browser, you point to an URL like http://www.myhost.com/netsaint, this value should be /netsaint. Basically, its the path portion of the URL that is used to access the NetSaint HTML pages.

URL CGI-BIN Path

Format: url_cgibin_path=<path>
Example: url_cgibin_path=/cgi-bin/netsaint

If, when accessing NetSaint's CGI programs via a web browser, you point to an URL like http://www.myhost.com/cgi-bin/netsaint, this value should be /cgi-bin/netsaint. Basically, its the path portion of the URL that is used to access the NetSaint CGI-BIN programs.

Process Check Command

Format: process_check_command=<command_line>
Example: process_check_command=/usr/local/netsaint/libexec/check_netsaint /usr/local/netsaint/var/status.log 5 '/usr/local/netsaint/bin/netsaint -d /usr/local/netsaint/etc/netsaint.cfg'

This is the command that the CGIs should use to check the status of the NetSaint process. This provides the CGIs (as well as yourself) with some idea of whether or not NetSaint is still running. If the CGIs cannot determine whether or not NetSaint is running on the local machine, some features like external commands in the extended information and command CGIs may not be available. The process check command that you specify should follow the same guidelines that are required of the plugins.

Notes:

  • The check_netsaint plugin is ideal for the purpose of checking both the status of the NetSaint process and the "freshness" of the data in the status log. I would highly recommend using it in this situation.
  • If you are running a chroot'ed web server, you will have to place the plugin (or whatever you're using) in the sbin/ subdirectory of your NetSaint installation.

Alert Window Suppression

Format: suppress_alert_window=<0/1>
Example: suppress_alert_window=1

This option allows you to specify whether or not you want to permanently suppress the host alert window in the status CGI. Normally the alert window will be displayed if one or more hosts is down or unreachable.

  • 0 = Don't suppress alert window, allow it to be displayed (default)
  • 1 = Don't display alert window at any time

CGI Refresh Rate

Format: refresh_rate=<rate_in_seconds>
Example: refresh_rate=90

This option allows you to specify the number of seconds between page refreshes for the status, statusmap, and extinfo CGIs.

Custom HTML Table Colors

Formats: html_table_fg_color=<HTML_color>
html_table_bg_color=<HTML_color>
html_table_bg_odd_color=<HTML_color>
html_table_bg_even_color=<HTML_color>
Examples: html_table_fg_color=#DCE5C1
html_table_bg_color=#7172A2
html_table_bg_odd_color=#E1E2ED
html_table_bg_even_color=#EEEEF4

These options allow you to override the default colors used in the HTML tables produced by the CGIs. The <html_table_bg_color> and <html_table_bg_color> options are used to control the background and foreground colors used in the table headers. The <html_table_bg_odd_color> and <html_table_bg_even_color> options are used to specify alternating background colors used in table rows that contain data. These options are completely option. If you do not define any colors to be used in the tables, the default program colors will be used.


netsaint/help/command.html0100644000076400000000000000446407112060120014462 0ustar timroot
NetSaint Configuration

Command Configuration

Command Definition

Format:command[<command_name>]=<command_line>
Example 1: command[check-host-alive]=/usr/local/netsaint/libexec/check_ping $HOSTADDRESS$ 100 100 1000.0 1000.0
Example 2: command[check_pop]=/usr/local/netsaint/libexec/check_pop $HOSTADDRESS$
Example 3: command[check_disk]=/usr/local/netsaint/libexec/check_disk 85 95 $ARG1$

A command definition is just that. It defines a command. Commands that can be defined include service checks, service notifications, service event handlers, host checks, host notifications, and host event handlers. Command definitions can contain macros, but you must make sure that you include only those macros that are "valid" for the circumstances when the command will be used. More information on what macros are available and when they are "valid" can be found here. The different arguments to a command definition are outlined below.

<command_name> This is a short name used to identify the command. It is referenced in contact, host, and service definitions.
<command_line> This is what is actually executed by NetSaint when the command is used for service or host checks, notifications, or event handlers. Before the command line is executed, all valid macros are replaced with their respective values. See the documentation on macros for determining when you can use different macros. Note that the command line is not surrounded in quotes.


netsaint/help/commands.html0100644000076400000000000000015307112056674014657 0ustar timroot
NetSaint Configuration
Here is a list of all commands. Click on the name to edit.
netsaint/help/contact.html0100644000076400000000000001673707112060114014510 0ustar timroot
NetSaint Configuration

Contact Configuration

Contact Definition

Format:contact[<contact_name>]=<contact_alias>;<svc_notification_period>;<host_notification_period>;<svc_notify_recovery>;<svc_notify_critical>;<svc_notify_warning>;lt;host_notify_recovery>;<host_notify_down>;<host_notify_unreachable>;<service_notify_commands>;<host_notify_commands>;<email_address>;<pager>
Example: contact[egalstad]=Ethan Galstad;24x7;24x7;1;1;1;1;1;1;notify-by-email,notify-by-epager;host-notify-by-epager;egalstad@nospam.extension.umn.edu;pagegalstad@pagenet.com

A contact definition is used to identify someone who should be contacted in the event of a problem on your network. The different arguments to a contact definition are described below.

<contact_name> This is the short name used to identify the contact. It is referenced in contact group definitions. Under the right circumstances, the $CONTACTNAME$ macro will contain this value.
<contact_alias> This is a longer name or description for the contact. Under the rights circumstances, the $CONTACTALIAS$ macro will contain this value.
<svc_notification_period> This is the short name of the time period during which the contact can be notified about service problems or recoveries. You can think of this as an "on call" time for service notifications for the contact. Read the "Time Periods" document in the theory of operation section of the documentation for more information on how this works and potential problems that may result from improper use.
<host_notification_period> This is the short name of the time period during which the contact can be notified about host problems or recoveries. You can think of this as an "on call" time for host notifications for the contact. Read the "Time Periods" document in the theory of operation section of the documentation for more information on how this works and potential problems that may result from improper use.
<svc_notify_recovery> This value determines whether or not the contact will be notified of service recoveries. Set this value to 1 if the contact should be notified, 0 if they shouldn't. Note: If a service is configured to not send out notifications upon recovery, contacts will not be notified about recoveries for that service, regardless of this setting.
<svc_notify_critical> This value determines whether or not the contact will be notified if a service is in a critical state. Set this value to 1 if the contact should be notified of critical states, 0 if they shouldn't. Note: If a service is configured to not send out notifications for critical states, contacts will not be notified about critical states for that service, regardless of this setting.
<svc_notify_warning> This value determines whether or not the contact will be notified if a service is in either a warning or an unknown state. Set this value to 1 if the contact should be notified of warning/unknown states, 0 if they shouldn't. Note: If a service is configured to not send out notifications for warning/unknown states, contacts will not be notified about warning/unknown states for that service, regardless of this setting.
<host_notify_recovery> This value determines whether or not the contact will be notified if any host recovers. Set this value to 1 if the contact should be notified of hosts that recover, 0 if they shouldn't. Note: If a host is configured to not send out notifications for recoveries, contacts will not be notified when the host recovers, regardless of this setting.
<host_notify_down> This value determines whether or not the contact will be notified if any host goes down. Set this value to 1 if the contact should be notified of hosts that go down, 0 if they shouldn't. Note: If a host is configured to not send out notifications for down states, contacts will not be notified when the host goes down, regardless of this setting.
<host_notify_unreachable> This value determines whether or not the contact will be notified if any host becomes unreachable. Set this value to 1 if the contact should be notified of hosts that become unreachable, 0 if they shouldn't. Note: If a host is configured to not send out notifications for unreachable states, contacts will not be notified when the host becomes unreachable, regardless of this setting.
<service_notify_commands> This is a list of the short names of the commands used to notify the contact of a service problem or recovery. Multiple notification commands should be separated by commas. All notification commands are executed when the contact needs to be notified.
<host_notify_commands> This is a list of the short names of the commands used to notify the contact of a host problem or recovery. Multiple notification commands should be separated by commas. All notification commands are executed when the contact needs to be notified.
<email_address> This is the email address for the contact. Depending on how you configure your notification commands, it can be used to send out an alert email to the contact. Under the right circumstances, the $CONTACTEMAIL$ macro will contain this value. fs
<pager> This is the pager number for the contact. It can also be an email address to a pager gateway (i.e. pagejoe@pagenet.com). Depending on how you configure your notification commands, it can be used to send out an alert page to the contact. Under the right circumstances, the $CONTACTPAGER$ macro will contact this value.


netsaint/help/contactgroup.html0100644000076400000000000000332707112060110015550 0ustar timroot
NetSaint Configuration

Contactgroup Configuration

Contact Group Definition

Format:contactgroup[<group_name>]=<group_alias>;<contacts>
Example: contactgroup[nt-admins]=NT Administrators;egalstad,jdoe

A contact group definition is used to group one or more contacts together for the purpose of sending out alert/recovery notifications. When a host or service has a problem or recovers, NetSaint will find the appropriate contact groups to send notifications to, and notify all contacts in those contact groups. This may sound complex, but for most people it doesn't have to be. It does, however, allow for flexibility in determining who gets notified for particular events. The different arguments to a contact group definition are outlined below.

<group_name> This is a short name used to identify the contact group.
<group_alias> This is a longer name or description used to identify the contact group.
<contacts> This is a list of the short names of contacts that should be included in this group. Multiple contact names should be separated by commas.


netsaint/help/contacts.html0100644000076400000000000000020207112056634014663 0ustar timroot
NetSaint Configuration
Here you see a list of all contacts and contactgroups. Click on the name to edit.
netsaint/help/files.html0100644000076400000000000001115107112055437014154 0ustar timroot
NetSaint Configuration

File settings

Log file
Host configuration file
Status file
Temp file
Full path to external command file


Log File

Format: log_file=<file_name>
Example: log_file=/usr/local/netsaint/var/netsaint.log

This variable specifies where NetSaint should create its main log file. This should be the first variable that you define in your configuration file, as NetSaint will try to write errors that it finds in the rest of your configuration data to this file. This file is never deleted, pruned or rotated by NetSaint. I suggest adding a cron job to do log rotations every month or so (more often if you have a lot of alarms).

Host Configuration File

Format: cfg_file=<file_name>
Example: cfg_file=/usr/local/netsaint/etc/hosts.cfg

This specifies the host configuration file that NetSaint should use for monitoring. Host configuration files contain configuration data for hosts, host groups, contacts, contact groups, services, commands, etc.

Status File

Format: status_file=<file_name>
Example: status_file=/usr/local/netsaint/var/status.log

This is the file that NetSaint uses to store the current status of all monitored services. The status of all hosts associated with the service you monitor are also recorded here. This file is used by the "status" CGI so that current monitoring status can be reported via a web interface. The CGIs must have read access to this file in order to function properly. This file is deleted every time NetSaint stops and recreated when it starts.

Temp File

Format: temp_file=<file_name>
Example: temp_file=/usr/local/netsaint/var/netsaint.tmp

This is the temporary file into which NetSaint redirects the standard output and error from the execution of plugins. The output from the plugins is scooped from the temp file and used for both display in the "status" CGI output and use in notification macros. This file is deleted after the plugin has been executed. This file is also used as a scratch file when NetSaint updates the status log.

External Command Check Option

Format: check_external_commands=<0/1>
Example: check_external_commands=1

This option determines whether or not NetSaint will check the command file for internal commands it should execute. This option must be enabled if you plan on using the command CGI to issue commands via the web interface. Third party programs can also issue commands to NetSaint by writing to the command file, provided proper rights to the file have been granted as outlined in this FAQ. More information on external commands can be found here.

  • 0 = Don't check external commands (default)
  • 1 = Check external commands


netsaint/help/host.html0100644000076400000000000002631607112060030014021 0ustar timroot
NetSaint Configuration

Host Configuration

Main host configuration
Extended host information

Host Definition

Format:host[<host_name>]=<host_alias>;<address>;<parent_host>;<host_check_command>;<max_attempts>;<notification_interval>;<notification_period>;<notify_recovery>;<notify_down>;<notify_unreachable>;<event_handler>
Example: host[es-gra]=ES-GRA Server;192.168.0.1;;check-host-alive;3;120;24x7;1;1;1;

A host definition is used to define a physical server, workstation, device, etc. that resides on your network. The different arguments to a host definition are described below.

<host_name> This is a short name used to identify the host. It is used in host group and service definitions to reference this particular host. Hosts can have multiple services (which are monitored) associated with them. When used properly, the $HOSTNAME$ macro will contain this short name.
<host_alias> This is a longer name or description used to identify the host. It is provided in order to allow you to more easily identify a particular host. When used properly, the $HOSTALIAS$ macro will contain this alias/description.
<address> This is the IP address of the host. You can use a FQDN to identify the host, but if DNS services are not availble this could cause problems. When used properly, the $HOSTADDRESS$ macro will contain this address.
<parent_host> This is the short name of the "parent" host for this particular host. Parent hosts are typically routers, switches, firewalls, etc. that lie between the monitoring host and a remote hosts. The router, switch, etc. which is closest to the remote host is considered to be that host's "parent". Read the "Determining Status and Reachability of Network Hosts" document in the theory of operation section for more information. If this host is on the same network segment as the host doing the monitoring (without any intermediate routers, etc.) the host is considered to be on the local network and will not have a parent host. Leave this value blank if the host does not have a parent host (i.e. it is on the local network).
<host_check_command> This is the short name of the command that should be used to check if the host is up or down. Typically, this command would try and ping the host to see if it is "alive". The command must return a status of OK (0) or NetSaint will assume the host is down. If you leave this argument blank, the host will not be checked - NetSaint will always assume the host is up. This is useful if you are monitoring printers or other devices that are frequently turned off.
<max_attempts> This is the number of times that NetSaint will retry the host check command if it returns any state other than an OK state. Setting this value to 1 will cause NetSaint to generate an alert without retrying the host check again. Note: If you do not want to check the status of the host, you must still set this to a minimum value of 1. To bypass the host check, just leave the <host_check_command> option blank.
<notification_interval> This is the number of "time units" to wait before re-notifying a contact that this server is still down. Unless you've changed the interval_length value in the main configuration file from the default value of 60, this number will mean minutes.
<notification_period> This is the short name of the time period during which notifications of events for this host can be sent out to contacts. If a host goes down, becomes unreachable, or recoveries during a time which is not covered by the time period, no notifications will be sent out. Read the "Time Periods" document in the theory of operation section for more information.
<notify_recovery> This value determines whether or not notifications should be sent to any contacts if the host is in a RECOVERY state. Set this value to 1 if notifications should be sent out about recovery states, 0 if they shouldn't. Note: If a contact is configured to not receive notifications of host recoveries, they will not be notified, regardless of this setting.
<notify_down> This value determines whether or not notifications should be sent to any contacts if the host is in a DOWN state. Set this value to 1 if notifications should be sent out when the host goes down, 0 if they shouldn't. Note: If a contact is configured to not receive notifications about hosts that go down, they will not be notified, regardless of this setting.
<notify_unreachable> This value determines whether or not notifications should be sent to any contacts if the host is in aa UNREACHABLE state. Set this value to 1 if notifications should be sent out when the host becomes unreachable, 0 if they shouldn't. Note: If a contact is configured to not receive notifications about unreachable hosts, they will not be notified, regardless of this setting.
<event_handler> This is the short name of the command that should be run whenever a change in the state of the host is detected (i.e. whenever it goes down or recovers). Read the documentation on event handlers for a more detailed explanation of how to write scripts for handling events. If you do not wish to define an event handler for the host, leave this option blank (as shown in the example above).

Extended Host Information

Format: hostextinfo[<host_name>]=<notes_url>;<icon_image>;<vrml_image>;<gd2_image>;<alt_tag>
Example: hostextinfo[router3]=/hostinfo/router3.html;cat5000.gif;cat5000.jpg;cat5000.gd2;Cisco Catalyst 5000

Extended host information entries are basically used to make the output from the status, statusmap, statuswrl, and extinfo CGIs look pretty. They have no effect on monitoring and are completely optional.

<host_name> This is a short name of the host, as defined in the host configuration file.
<notes_url> This is an optional URL that can be used to provide more information about the host. If you specify an URL, you will see a link that says "Notes About This Host" in the extended information CGI (when you are viewing information about the specified host). Any valid URL can be used. If you plan on using relative paths, the base path will the the same as what is used to access the CGIs (i.e. /cgi-bin/netsaint/). This can be very useful if you want to make detailed information on the host, emergency contact methods, etc available to other support staff.
<icon_image> The name of a GIF, PNG, or JPG image that should be associated with this host. This image will be displayed in the status and extended information CGIs. The image will look best if it is 40x40 pixels in size. Images for hosts are assumed to be in the logos/ subdirectory in your HTML images directory (i.e. /usr/local/netsaint/share/images/logos).
<vrml_image> The name of a GIF, PNG, or JPG image that should be associated with this host. This image will be used as the texture map for the specified host in the statuswrl CGI. Unlike the image you use for the <icon_image> variable, this one should probably not have any transparency. If it does, the host object will look a bit wierd. Images for hosts are assumed to be in the logos/ subdirectory in your HTML images directory (i.e. /usr/local/netsaint/share/images/logos).
<gd2_image> The name of a GD2 format image that should be associated with this host. This image will be used in the image created by the statusmap CGI. GD2 images can be created from PNG images by using the pngtogd2 utility supplied with Thomas Boutell's gd library. The GD2 images should be created in uncompressed format in order to minimize CPU load when the statusmap CGI is generating the network map image. The image will look best if it is 40x40 pixels in size. You can leave these option blank if you are not using the statusmap CGI. Images for hosts are assumed to be in the logos/ subdirectory in your HTML images directory (i.e. /usr/local/netsaint/share/images/logos).
<alt_tag> An optional string that is used in the ALT tag of the image specified by the <icon_image> argument. The ALT tag is used in both the status and statusmap CGIs.


netsaint/help/hosts.html0100644000076400000000000000023007112056545014207 0ustar timroot
NetSaint Configuration
Here you see a list of all hosts and hostgroups. Click on the name to edit the appropriate host(group).
netsaint/help/hostgroup.html0100644000076400000000000000455507112060036015105 0ustar timroot
NetSaint Configuration

Hostgroup Configuration

Host Group Definition

Format:hostgroup[<group_name>]=<group_alias>;<contact_groups>;<hosts>
Example: hostgroup[nt-servers]=All NT Servers;nt-admins;rosie,dev,liatris

A host group definition is used to group one or more hosts together for the purposes of simplifying notifications. Each host that you define must be a member of at least one host group - even if it is the only host in that group. Hosts can be in more than one host group. When a host goes down, becomes unreachable, or recovers, NetSaint will find which host group(s) the host is a member of, get the contact group for each of those hostgroups, and notify all contacts associated with those contact groups. This may sound complex, but for most people it doesn't have to be. It does, however, allow for flexibility in determining who gets paged for what kind of problems. The different arguments to a host group definition are outlined below.

<group_name> This is a short name used to identify the host group.
<group_alias> This is a longer name or description used to identify the host group. It is provided in order to allow you to more easily identify a particular host group.
<contact_groups> This is a list of the short names of the contact groups that should be notified whenever there are problems (or recoveries) with any of the hosts in this host group. Multiple contact groups should be separated by commas.
<hosts> This is a list of the short names of hosts that should be included in this group. Multiple host names should be separated by commas.


netsaint/help/logging.html0100644000076400000000000001757607112056456014523 0ustar timroot
NetSaint Configuration

Logging Configuration

Log severity level
Syslog logging option
Syslog severity level
Notification logging option
Service check retry logging option
Host retry logging option
Event handler logging option
Log rotation method
Log archive path


Log Severity Level

Format: log_level=<1-2>
Example: log_level=1

This is the level of severity needed for service messages to be logged to the main log file. Values are as follows:

Notes:

  • This should almost *always* be set to 1. If it isn't your mileage may vary, as I haven't really tested the consequences.

Syslog Logging Option

Format: use_syslog=<0/1>
Example: use_syslog=1

This variable determines whether messages are logged to the syslog facility on your local host. Values are as follows:

  • 0 = Don't use syslog facility
  • 1 = Use syslog facility

Syslog Severity Level

Format: syslog_level=<1-2>
Example: syslog_level=1

This is the level of severity needed for service messages to be logged to the syslog facility. Values are as follows:

Notes:

    This should almost *always* be set to 1. If it isn't your mileage may vary, as I haven't really tested the consequences.

Notification Logging Option

Format: log_notifications=<0/1>
Example: log_notifications=1

This variable determines whether or not notification messages are logged. If you have a lot of contacts or regular service failures your log file will grow relatively quickly. Use this option to keep contact notifications from being logged.

  • 0 = Don't log notifications
  • 1 = Log notifications

Service Check Retry Logging Option

Format: log_service_retries=<0/1>
Example: log_service_retries=1

This variable determines whether or not service check retries are logged. Service check retries occur when a service check results in a non-OK state, but you have configured NetSaint to retry the service more than once before responding to the error. Services in this situation are considered to be in "soft" states. Logging service check retries is mostly useful when attempting to debug NetSaint or test out service event handlers.

  • 0 = Don't log service check retries
  • 1 = Log service check retries

Event Handler Logging Option

Format: log_event_handlers=<0/1>
Example: log_event_handlers=1

This variable determines whether or not service and host event handlers are logged. Event handlers are optional commands that can be run whenever a service or hosts changes state. Logging event handlers is most useful when debuggin NetSaint or first trying out your event handler scripts.

  • 0 = Don't log event handlers
  • 1 = Log event handlers

Host Check Retry Logging Option

Format: log_host_retries=<0/1>
Example: log_host_retries=1

This variable determines whether or not host check retries are logged. Logging host check retries is mostly useful when attempting to debug NetSaint or test out host event handlers.

  • 0 = Don't log host check retries
  • 1 = Log host check retries

Log Rotation Method

Format: log_rotation_method=<n/h/d/w/m>
Example: log_rotation_method=d

This is the rotation method that you would like NetSaint to use for your log file. Values are as follows:

  • n = None (don't rotate the log - this is the default)
  • h = Hourly (rotate the log at the top of each hour)
  • d = Daily (rotate the log at midnight each day)
  • w = Weekly (rotate the log at midnight on Saturday)
  • m = Monthly (rotate the log at midnight on the last day of the month)

Log Archive Path

Format: log_archive_path=<path>
Example: log_archive_path=/usr/local/netsaint/var/archives/

This is the directory where NetSaint should place log files that have been rotated. This option is ignored if you choose to not use the log rotation functionality.


netsaint/help/misc.html0100644000076400000000000002532507112055225014010 0ustar timroot
NetSaint Configuration

Miscellanous Settings

Program mode
Timing interval length
Agressive host checking option
Method to use to determine time between checks
Global host eventhandler
Global service Eventhandler
Inter-check sleep time
Service check interleave factor
Maximum concurrent checks
Service reaper frequency


Program Mode

Format: program_mode=<a/s>
Example: program_mode=a

Timing Interval Length

Format: interval_length=<seconds>
Example: interval_length=60

This is the number of seconds per "unit interval" used for timing in the scheduling queue, re-notifications, etc. "Units intervals" are used in the host configuration file to determine how often to run a service check, how often of re-notify a contact, etc.

Important: The default value for this is set to 60, which means that a "unit value" of 1 in the host configuration file will mean 60 seconds (1 minute). I have not really tested other values for this variable, so proceed at your own risk if you decide to do so!

Agressive Host Checking Option

Format: use_agressive_host_checking=<0/1>
Example: use_agressive_host_checking=0

Beginning with release 0.0.4, NetSaint tries to be a little smarter about how and when it checks the status of hosts. In general, disabling this option will allow NetSaint to make some smarter decisions and check hosts a bit faster. Enabling this option will increase the amount of time required to check hosts, but may improve reliability a bit. If you want to know more about exactly what this option does, search the source code in the netsaint.c file for the string "use_agressive_host_checking" and read some of the comments I've added. Unless you have problems with NetSaint not recognizing that a host recovered, I would suggest not enabling this option.

  • 0 = Don't use agressive host checking (default)
  • 1 = Use agressive host checking

Inter-Check Delay Method

Format: inter_check_delay_method=<n/d/s>
Example: inter_check_delay_method=s

This option allows you to control how service checks are initially "spread out" in the event queue. Using a "smart" delay calculation (the default) will cause NetSaint to calculate an average check interval and spread initial checks of all services out over that interval, thereby helping to eliminate CPU load spikes. Using no delay is generally not recommended unless you are testing the service check parallelization functionality. Using no delay will cause all service checks to be scheduled for execution at the same time. This means that you will generally have large CPU spikes when the services are all executed in parallel. Values are as follows:

  • n = Don't use any delay - schedule all service checks to run immediately (i.e. at the same time!)
  • d = Use a "dumb" delay of 1 second between service checks
  • s = Use a "smart" delay calculation to spread service checks out evenly (default)

Global Host Event Handler Option

Format: global_host_event_handler=<command>
Example: global_host_event_handler=log-host-event-to-db

This option allows you to specify a host event handler command that is to be run for every host state change. The global event handler is executed immediately prior to the event handler that you have optionally specified in each host definition. The command argument is the short name of a command definition that you define in your host configuration file. More information on event handlers can be found here.

Global Service Event Handler Option

Format: global_service_event_handler=<command>
Example: global_service_event_handler=log-service-event-to-db

This option allows you to specify a service event handler command that is to be run for every service state change. The global event handler is executed immediately prior to the event handler that you have optionally specified in each service definition. The command argument is the short name of a command definition that you define in your host configuration file. More information on event handlers can be found here.

Inter-Check Sleep Time

Format: sleep_time=<seconds>
Example: sleep_time=1

This is the number of seconds that NetSaint will sleep before checking to see if the next service check in the scheduling queue should be executed. Note that NetSaint will only sleep after it "catches up" with queued service checks that have fallen behind.

Service Interleave Factor

Format: service_interleave_factor=<s|n>
Example: service_interleave_factor=s

This variable determines how service checks are interleaved. Interleaving allows for a more even distribution of service checks, reduced load on remote hosts, and faster overall detection of host problems. With the introduction of service check parallelization, remote hosts could get bombarded with checks if interleaving was not implemented. This could cause the service checks to fail or return incorrect results if the remote host was overloaded with processing other service check requests. Setting this value to 1 is equivalent to not interleaving the service checks (this is how versions of NetSaint previous to 0.0.5 worked). Set this value to s (smart) for automatic calculation of the interleave factor unless you have a specific reason to change it. The best way to understand how interleaving works is to watch the status CGI (detailed view) when NetSaint is just starting. You should see that the service check results are spread out as they begin to appear.

  • n = A number greater than or equal to 1 that specifies the interleave factor to use. An interleave factor of 1 is equivalent to not interleaving the service checks.
  • s = Use a "smart" interleave factor calculation (default)

Maximum Concurrent Service Checks

Format: max_concurrent_checks=<max_checks>
Example: max_concurrent_checks=20

This option allows you to specify the maximum number of service checks that can be run in parallel at any given time. Specifying a value of 1 for this variable essentially prevents any service checks from being parallelized. You'll have to modify this value based on the system resources you have available on the machine that runs NetSaint, as it directly affects the maximum load that will be imposed on the system (processor utilization, memory, etc.).

Service Reaper Frequency

Format: service_reaper_frequency=<frequency_in_seconds>
Example: service_reaper_frequency=10

This option allows you to control the frequency in seconds of service "reaper" events. "Reaper" events process the results from parallelized service checks that have finished executing. These events consitute the core of the monitoring logic in NetSaint.


netsaint/help/notifications.html0100644000076400000000000000551007112056504015721 0ustar timroot
NetSaint Configuration

Notification Settings

Generic service notification summary
Administrator email address
Administrator pager


Generic Service Notification Summary

Format: generic_summary=<notification_string_with_macros>
Example: generic_summary="***** NetSaint *****\n\n$SERVICESTATE$ alert/notification\n\nDate/Time: $DATETIME$\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\n\nAdditional Info:\n\n$OUTPUT$"

This is an optional generic service alert summary for use in service notification commands. If you define this variable you are able to use the $SUMMARY$ macro in notification messages. This is intended to ease the administrators wrist by not having to type a long, similiar message for each service notification command that is defined. Macros are allowed in the generic summary message. See the documentation on macros for information on what types of macros are "valid". Basically, any macro that is valid during a service notification can be used.

Administrator Email Address

Format: admin_email=<email_address>
Example: admin_email=root

This is the email address for the administrator of the local machine (i.e. the one that NetSaint is running on). This value can be used in notification commands by using the $ADMINEMAIL$ macro.

Administrator Pager

Format: admin_pager=<pager_number_or_pager_email_gateway>
Example: admin_pager=pageroot@pagenet.com

This is the pager number (or pager email gateway) for the administrator of the local machine (i.e. the one that NetSaint is running on). The pager number/address can be used in notification commands by using the $ADMINPAGER$ macro.


netsaint/help/service.html0100644000076400000000000002252407112060200014500 0ustar timroot
NetSaint Configuration

Service Configuration

Service Definition

Format:service[<host>]=<description>;<check_period>;<max_attempts>;<check_interval>;<retry_interval>;<contactgroups>;<notification_interval>;<notification_period>;<notify_recovery>;<notify_critical>;<notify_warning>;<event_handler>;<check_command>
Example 1: service[rosie]=FTP;24x7;3;5;1;nt-admins;120;24x7;1;1;1;;check_ftp
Example 2: service[dev]=HTTP;24x7;3;5;1;nt-admins;240;24x7;1;1;1;;check_http2!192.168.0.2!/!88
Example 3: service[real]=Zombie Processes;24x7;3;5;1;linux-admins;240;24x7;1;1;1;;check_procs!5!10!Z

A service definition is used to identify a "service" that runs on a host. The term "service" is used very loosely. It can mean an actual service that runs on the host (POP, SMTP, HTTP, etc.) or some other type of metric associated with the host (response to a ping, number of logged in users, free disk space, etc.). The different arguments to a service definition are outlined below.

<host> This is the short name of the host that the service "runs" on or is associated with.
<check_period> This is the short name of the time period that identifies when this service can be checked. Services checks are scheduled in such a way that they are only checked (or rechecked) during times that are valid within the specified service check time period. See the "Time Periods" documentation in the theory of operation section for more information on how time periods works and potentials problems with using them improperly.
<max_attempts> This is the number of times that NetSaint will retry the service check if it returns any state other than an OK state. Setting this value to 1 will cause NetSaint to generate an alert (if the service check detected a problem) without retrying the service check again.
<check_interval> This is the number of "time units" to wait before scheduling the next "regular" check of the service. "Regular" checks are those that occur when the service is in an OK state or when the service is in a non-OK state, but has already been rechecked max_attempts number of times. Unless you've changed the interval_length value in the main configuration file from the default value of 60, this number will mean minutes.
<retry_interval> This is the number of "time units" to wait before scheduling a re-check of the service. Services are rescheduled at the retry interval when the have changed to a non-OK state. Once the service has been retried max_attempts times without a change in its status, it will revert to being scheduled at its "normal" rate as defined by the check_interval value. Unless you've changed the interval_length value in the main configuration file from the default value of 60, this number will mean minutes.
<contactgroups> This is a comma-delimited list of the short names of contact groups that should be notified about problems or recoveries for this service. If a problem or recovery occurs for this service, NetSaint will attempt to notify all the contacts in each contact group (depending on the notification options that are set below).
<notification_interval> This is the number of "time units" to wait before re-notifying a contact that this service is still at a non-OK state. Unless you've changed the interval_length value in the main configuration file from the default value of 60, this number will mean minutes.
<notification_period> This is the short name of the time period that identifies when notifications about problems or recoveries for this service may be sent out. If a service problem or recovery occurs outside valid times within this time period, notifications will not be sent out. See the "Time Periods" documentation in the theory of operation section for more information on how time periods works and potentials problems with using them improperly.
<notify_recovery> This value determines whether or not alert notifications will be generated if the service recovers from a non-OK state. Set this value to 1 if the service should generate alerts for recoveries, 0 if it shouldn't. Note: If a contact is configured to not receive recovery notifications, they will not be notified of any recoveries for this service, regardless of this setting.
<notify_critical> This value determines whether or not alert notifications will be generated if the service is in a CRITICAL state. Set this value to 1 if the service should generate alerts for critical states, 0 if it shouldn't. Note: If a contact is configured to not receive critical notifications, they will not be notified of any critical states for this service, regardless of this setting.
<notify_warning> This value determines whether or not alert notifications will be generated if the service is in a WARNING or UNKNOWN state. Set this value to 1 if the service should generate alerts for warning/unknown states, 0 if it shouldn't. Note: If a contact is configured to not receive warning/unknown notifications, they will not be notified of any warning/unknown states for this service, regardless of this setting.
<event_handler> This is the short name of the command that should be run whenever a change in the status of the services is detected (i.e. whenever it goes down or recovers). Read the documentation on event handlers for a more detailed explanation of how to write scripts for handling events. If you do not wish to define an event handler for the service, leave this option blank (as shown in the examples above).
<check_command>

This is the command that NetSaint will run in order to check the status of the service. There are three command formats that can be used:

1. "Vanilla" Command: The command name is just the name of command that was previously defined. Example 1 above shows this type of command.
2. Command w/ Arguments: This is basically the same as the "vanilla" command style, but with command options separated by a ! character. Example 2 above shows this type of command. Arguments are separated from the command name (and other arguments) with the ! character. The command should be defined to make use of the $ARGx$ macros. In Example 2 above, $ARG1$ would resolve to 134.84.92.128, $ARG2$ would resolve to /, and $ARG3$ would resolve to 88 for that particular service. Note: NetSaint will handle a maximum of sixteen command line arguments ($ARG1$ through $ARG16$).
3. "Raw" Command Line: You may optionally specify an actual command line to be executed. To do so you must enclose the entire command line in double quotes. The outer double quotes will be stripped off before the command is actually executed. No macros are processed inside of raw command lines. Note: I haven't really tested this format too much, but it should work. Remember that the command must return a proper status level. See the documentation on writing plugins for numeric codes for each status level.


netsaint/help/timeperiod.html0100644000076400000000000000523707112060206015211 0ustar timroot
NetSaint Configuration

Timeperiod Configuration

Time Period Definition

Format:timeperiod[<timeperiod_name>]=<timeperiod_alias>;<sunday_ranges>;<monday_ranges>;<tuesday_ranges>;<wenesday_ranges>;<thursday_ranges>;<friday_ranges>;<saturday_ranges>;
Example 1: timeperiod[24x7]=All Day, Every Day;00:00-24:00;00:00-24:00;00:00-24:00;00:00-24:00;00:00-24:00;00:00-24:00;00:00-24:00
Example 2: timeperiod[workhours]="Normal" Working Hours;;09:00-17:00;09:00-17:00;09:00-17:00;09:00-17:00;09:00-17:00;
Example 3: timeperiod[none]=No Time Is A Good Time;;;;;;;
Example 4: timeperiod[nonworkhours]=Non-Work Hours;00:00-24:00;00:00-09:00,17:00-24:00;00:00-09:00,17:00-24:00;00:00-09:00,17:00-24:00;00:00-09:00,17:00-24:00;00:00-09:00,17:00-24:00;00:00-24:00

A time period is a list of times during various days that are considered to be "valid" times for notifications and service checks. It consists one or more time periods for each day of the week that "rotate" once the week has come to an end. Exceptions to the normal weekly time range rotations are not suported.

<timeperiod_name> This is a short name used to identify the time period.
<timeperiod_alias> This is a longer name or description used to identify the time period.
<xday_ranges> This is a comma-delimited list of time ranges that are "valid" times for a particular day of the week. Notice that there are seven different days for which you must define time ranges (Sunday through Saturday). Each time range is in the form of HH:MM-HH:MM, where hours are specified on a 24 hour clock. For example, 00:15-24:00 means 12:15am in the morning for this day until 12:20am midnight (a 23 hour, 45 minute total time range). If you leave a particular day's time range blank, it means that there are no "valid" times for that day.


netsaint/help/timeperiods.html0100644000076400000000000000014507112060226015367 0ustar timroot
NetSaint Configuration
Here is a list of timeperiods. Click on one to edit.
netsaint/help/extcommands.html0100644000076400000000000000016407112056751015376 0ustar timroot
NetSaint Configuration
Here is a list of all external commands. Click on the name to edit.
netsaint/help/cgiauth.html0100644000076400000000000002657607112057515014516 0ustar timroot
NetSaint Configuration

CGI Configuration

Authentication usage
Default user name
System/process information access
System/process command access
Configuration information access
Global host information access
Global host command access
Global service information access
Global service command access


Authentication Usage

Format: use_authentication=<0/1>
Example: use_authentication=1

This option controls whether or not the CGIs will use the authentication and authorization functionality when determining what information and commands users have access to. I would strongly suggest that you use the authentication functionality for the CGIs. If you decide not to use authentication, make sure to remove the command CGI to prevent unauthorized users from issuing commands to NetSaint. The CGI will not issue commands to NetSaint if authentication is disabled, but I would suggest removing it altogether just to be on the safe side. More information on how to setup authentication and configure authorization for the CGIs can be found here.

  • 0 = Don't use authentication functionality
  • 1 = Use authentication and authorization functionality (default)

Default User Name

Format: default_user_name=<username>
Example: default_user_name=guest

Setting this variable will define a default username that can access the CGIs. This allows people within a secure domain (i.e., behind a firewall) to access the CGIs without necessarily having to authenticate to the web server. You may want to use this to avoid having to use basic authentication if you are not using a secure server, as basic authentication transmits passwords in clear text over the Internet.

Important: Do not define a default username unless you are running a secure web server and are sure that everyone who has access to the CGIs has been authenticated in some manner! If you define this variable, anyone who has not authenticated to the web server will inherit all rights you assign to this user!

System/Process Information Access

Format: authorized_for_system_information=<user1>,<user2>,<user3>,...<usern>
Example: authorized_for_system_information=netsaintadmin,theboss

This is a comma-delimited list of names of authenticated users who can view system/process information in the extended information CGI. Users in this list are not automatically authorized to issue system/process commands. If you want users to be able to issue system/process commands as well, you must add them to the authorized_for_system_commands variable. More information on how to setup authentication and configure authorization for the CGIs can be found here.

System/Process Command Access

Format: authorized_for_system_commands=<user1>,<user2>,<user3>,...<usern>
Example: authorized_for_system_commands=netsaintadmin

This is a comma-delimited list of names of authenticated users who can issue system/process commands via the command CGI. Users in this list are not automatically authorized to view system/process information. If you want users to be able to view system/process information as well, you must add them to the authorized_for_system_information variable. More information on how to setup authentication and configure authorization for the CGIs can be found here.

Configuration Information Access

Format: authorized_for_configuration_information=<user1>,<user2>,<user3>,...<usern>
Example: authorized_for_configuration_information=netsaintadmin

This is a comma-delimited list of names of authenticated users who can view configuration information in the configuration CGI. Users in this list can view information on all configured hosts, host groups, services, contacts, contact groups, time periods, and commands. More information on how to setup authentication and configure authorization for the CGIs can be found here.

Global Host Information Access

Format: authorized_for_all_hosts=<user1>,<user2>,<user3>,...<usern>
Example: authorized_for_all_hosts=netsaintadmin,theboss

This is a comma-delimited list of names of authenticated users who can view status and configuration information for all hosts. Users in this list are also automatically authorized to view information for all services. Users in this list are not automatically authorized to issue commands for all hosts or services. If you want users able to issue commands for all hosts and services as well, you must add them to the authorized_for_all_host_commands variable. More information on how to setup authentication and configure authorization for the CGIs can be found here.

Global Host Command Access

Format: authorized_for_all_host_commands=<user1>,<user2>,<user3>,...<usern>
Example: authorized_for_all_host_commands=netsaintadmin

This is a comma-delimited list of names of authenticated users who can issue commands for all hosts via the command CGI. Users in this list are also automatically authorized to issue commands for all services. Users in this list are not automatically authorized to view status or configuration information for all hosts or services. If you want users able to view status and configuration information for all hosts and services as well, you must add them to the authorized_for_all_hosts variable. More information on how to setup authentication and configure authorization for the CGIs can be found here.

Global Service Information Access

Format: authorized_for_all_services=<user1>,<user2>,<user3>,...<usern>
Example: authorized_for_all_services=netsaintadmin,theboss

This is a comma-delimited list of names of authenticated users who can view status and configuration information for all services. Users in this list are not automatically authorized to view information for all hosts. Users in this list are not automatically authorized to issue commands for all services. If you want users able to issue commands for all services as well, you must add them to the authorized_for_all_service_commands variable. More information on how to setup authentication and configure authorization for the CGIs can be found here.

Global Service Command Access

Format: authorized_for_all_service_commands=<user1>,<user2>,<user3>,...<usern>
Example: authorized_for_all_service_commands=netsaintadmin

This is a comma-delimited list of names of authenticated users who can issue commands for all services via the command CGI. Users in this list are not automatically authorized to issue commands for all hosts. Users in this list are not automatically authorized to view status or configuration information for all hosts. If you want users able to view status and configuration information for all services as well, you must add them to the authorized_for_all_services variable. More information on how to setup authentication and configure authorization for the CGIs can be found here.


netsaint/defaultacl0100600000076400000000000000061307037600233013250 0ustar timrootfiles=1 html=1 cgi=1 misc=1 not=1 logging=1 hostedit=1 hostcreate=1 hostdelete=1 hostgroupedit=1 hostgroupcreate=1 hostgroupdelete=1 contactedit=1 contactcreate=1 contactdelete=1 contactgroupedit=1 contactgroupcreate=1 contactgroupdelete=1 commandedit=1 commandcreate=1 commanddelete=1 timeperiodedit=1 timeperiodcreate=1 timeperioddelete=1 serviceedit=1 servicecreate=1 servicedelete=1 netsaint/list_extcommands.cgi0100755000076400000000000000545307126637347015323 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999-2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 03.04.1999 $whatfailed=$text{'extcommands_error'}; require './netsaint-lib.pl'; require './extcommands-lib.pl'; @commands = &parse_extcommands(); &header($text{'extcommands_title'}, "", "extcommands", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); if ($config{'sort_commands'}) { @commands = sort { $a->{'time'} cmp $b->{'time'} } @commands; } $colspan=$config{'list_commands_detailed'} ? "3" : "4"; print <
EOM if ($config{'list_commands_detailed'}) { print < EOM for($i=0; $i<@commands; $i++) { print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; } } else { for($i=0; $i<@commands; $i++) { if ($i%4 == 0) { print "\n"; } print "\n"; if ($i%4 == 3) { print "\n"; } } if ((scalar(@commands)-1)%4 != 3) { print "\n"; } } if (! @commands) { print "\n" } print <
$text{'extcommands_header'}
Time External Command Arguments

$commands[$i]->{'time'}{'line'}\">", "$commands[$i]->{'comm'}$commands[$i]->{'args'}
{'line'}\">", "$commands[$i]->{'comm'}
$text{'extcommands_err_nofound'}

[ $text{'extcommands_new'} ] [ $text{'extcommands_config'} ] EOM print "

\n"; &footer("", $text{'extcommands_return'}); ### END of list_extcomands.cgi ###. netsaint/edit_extcommand.cgi0100755000076400000000000000477007126637347015113 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 26.12.1999 $whatfailed=$text{'extcommand_error'}; require './netsaint-lib.pl'; require './extcommands-lib.pl'; @commands = &parse_extcommands(); $command=0; foreach $c (@commands) { if ($c->{'line'} eq $in{'line'}) { $command=$c; last; } } if ($command) { $header=&text('extcommand_header', $command->{'comm'}); $title=$text{'extcommand_title_edit'}; } else { $header=$text{'extcommand_create'}; $title=$text{'extcommand_title_create'}; } $commselect = &commselect($command->{'comm'}); &header($title, "", "extcommand", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); print <
$header
$text{'extcommand_command'} $commselect
$text{'extcommand_arguments'}
EOM if ($command) { print "\n"; print ""; } else { print ""; } print "

\n"; &footer("list_extcommands.cgi", $text{'command_return'}); ### END of edit_command.cgi ###. netsaint/extcommands-lib.pl0100600000076400000000000000432307112027764014654 0ustar timroot # NetSaint Configuration Webmin Module # Copyright (C) 1999/2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # # 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. # Created: 03.04.2000 @posscomm = ("ADD_HOST_COMMENT", "ADD_SVC_COMMENT", "DEL_HOST_COMMENT", "DEL_ALL_HOST_COMMENTS", "DEL_SVC_COMMENT", "DEL_ALL_SVC_COMMENTS", "DELAY_HOST_NOTIFICATION", "DELAY_SVC_NOTIFICATION", "SCHEDULE_SVC_CHECK", "SCHEDULE_HOST_SVC_CHECKS", "ENABLE_SVC_CHECK", "DISABLE_SVC_CHECK", "ENABLE_SVC_NOTIFICATIONS", "DISABLE_HOST_SVC_NOTIFICATIONS", "ENABLE_HOST_SVC_CHECKS", "DISABLE_HOST_SVC_CHECKS", "ENABLE_HOST_NOTIFICATIONS", "DISABLE_HOST_NOTIFICATIONS", "ENABLE_ALL_NOTIFICATIONS_BEYOND_HOST", "DISABLE_ALL_NOTIFICATIONS_BEYOND_HOST", "ENTER_STANDBY_MODE", "ENTER_ACTIVE_MODE", "SHUTDOWN_PROGRAM", "RESTART_PROGRAM"); @posscomm = sort @posscomm; sub commselect { local($output, $o); $output = "
$text{'extcommopt_header'}
$text{'extcommopt_check'} $text{'yes'} $text{'no'}
$text{'misc_interval_length'} $text{'timeunits'}

EOM print "
\n"; &footer("list_extcommands.cgi", $text{'extcommopt_return'}); ### END of edit_extcommandoptions.cgi ###. netsaint/save_extcommandoptions.cgi0100755000076400000000000000360407126637347016533 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999-2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 06.04.2000 $whatfailed=$text{'sextcommopt_error'}; require './netsaint-lib.pl'; $access{'extcommedit'} || &error($text{'sextcommopt_notallowed'}); @conf=&parse_config($config{'main_config'}); $cfile=&read_file_lines($config{'main_config'}); if ($in{'interval'} !~ /^\d+$/ ) { &error(&text('sextcommopt_invalid', $in{'interval'}, $text{'sextcommopt_interval'}, $text{'sextcommopt_integer'})) } $tmp=&find_name('command_check_interval', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "command_check_interval", $in{'interval'}); } else { push(@{$cfile}, join('=', "command_check_interval", $in{'interval'})); } if ($in{'check'} !~ /^[01]$/) { &error(&text('sectcommopt_invalid', $in{'check'}, $text{'sextcommopt_check'}, $text{'sextcommopt_1or0'})) } $tmp=&find_name('check_external_commands', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "check_external_commands", $in{'check'}); } else { push(@{$cfile}, join('=', "check_external_commands", $in{'check'})); } &flush_file_lines(); &redirect("edit_extcommandoptions.cgi"); ### END of save_extcommandoptions.cgi ###. netsaint/save_extcommand.cgi0100755000076400000000000000400307126637347015111 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999-2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 08.04.2000 $whatfailed=$text{'sextcomm_error'}; require './netsaint-lib.pl'; require './extcommands-lib.pl'; @commands = &parse_extcommands(); $command=0; foreach $c (@commands) { if ($c->{'line'} eq $in{'line'}) { $command=$c; last } } if ($command) { if ($in{'delete'}) { $access{'extcommdelete'} || &error($text{'sextcomm_notallowed_delete'}); } else { $access{'extcommedit'} || &error($text{'sextcomm_notallowed_edit'}); } } else { if ($in{'new'}) { $access{'extcommcreate'} || &error($text{'sextcomm_notallowed_create'}); } } $cfile=&read_file_lines($config{'command_file'}); if ($command) { # the hostgroup exists, we change it if ($in{'delete'}) { # we delete an existing contact splice(@{$cfile}, $command->{'line'}, 1); } else { $cfile->[$command->{'line'}]="[" . time ."] $in{'comm'};$in{'arguments'}"; } } else { if ($in{'new'}) { $in{'line'} = scalar(@{$cfile}); push(@{$cfile}, "[" . time ."] $in{'comm'};$in{'arguments'}"); } else { &error(&text('sextcomm_notfound', $in{'line'})); } } &flush_file_lines(); if ($in{'delete'}) { &redirect("list_extcommands.cgi"); } else { &redirect("edit_extcommand.cgi?line=$in{'line'}"); } ### END of save_extcommand.cgi ###. netsaint/edit_auth.cgi0100755000076400000000000001015207126637347013704 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999-2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 09.04.2000 $whatfailed=$text{'auth_error'}; require './netsaint-lib.pl'; $access{'cgi'} || &error($text{'auth_notallowed'}); @conf=&parse_config($config{'cgi_config'}); $tmp=&find_name('use_authentication', \@conf); if ($tmp->{'values'}->[0]) { $auth=" CHECKED" } else { $nauth=" CHECKED" } $tmp=&find_name('default_user_name', \@conf); $defaultuser_value=$tmp->{'values'}->[0]; &header($text{'auth_title'}, "", "cgiauth", 1, 0, undef, "Written by
Tim Niemueller
Home://page"); foreach $a ("system_information", "system_commands", "configuration_information", "all_hosts", "all_host_commands", "all_services", "all_service_commands") { $tmp=&find_name("authorized_for_$a", \@conf); $tmpstr=$tmp->{'values'}->[0]; chomp $tmpstr; $tmpstr =~ s/,/\n/g; ${"${a}_value"} = $tmpstr; } print <
$text{'auth_header'}
$text{'auth_use'} $text{'yes'} $text{'no'}
$text{'auth_default_user'}


$text{'auth_access'}
 
$text{'auth_users_sysinfo'} $text{'auth_users_syscomm'}
$text{'auth_users_confinf'}
$text{'auth_users_hosts'} $text{'auth_users_hostcomm'}
$text{'auth_users_serv'} $text{'auth_users_servcomm'}

EOM print "
\n"; &footer("", $text{'auth_return'}); ### END of edit_auth.cgi ###. netsaint/save_auth.cgi0100755000076400000000000000452207126643173013713 0ustar timroot#!/usr/bin/perl # NetSaint Configuration Webmin Module # Copyright (C) 1999-2000 by Tim Niemueller, Stephen Nodvin, LinuxTel Associates # Written by Tim Niemueller - http://www.niemueller.de # 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. # This module inherited from the Webmin Module Template 0.75.1 by tn # Created 09.04.2000 $whatfailed=$text{'sauth_error'}; require './netsaint-lib.pl'; $access{'cgi'} || &error($text{'cgi_notallowed'}); @conf=&parse_config($config{'cgi_config'}); $cfile=&read_file_lines($config{'cgi_config'}); if ($in{'useauth'} !~ /^[01]$/ ) { &error(&text('sauth_invalid', $in{'useauth'}, $text{'sauth_useauth'}, $text{'sauth_0or1'})) } $tmp=&find_name('use_authentication', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "use_authentication", $in{'useauth'}); } else { push(@{$cfile}, join('=', "use_authentication", $in{'useauth'})); } $tmp=&find_name('default_user_name', \@conf); if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "default_user_name", $in{'defaultuser'}); } else { push(@{$cfile}, join('=', "default_user_name", $in{'defaultuser'})); } %directives=('sysinfo' => 'system_information', 'confinf' => 'configuration_information', 'syscomm' => 'system_commands', 'hosts' => 'all_hosts', 'hostcomm' => 'all_host_commands', 'serv' => 'all_services', 'servcomm' => 'all_service_commands'); for (keys %directives) { if (! $in{$_}) { &error(&text('sauth_invalid2', $text{"sauth_$_"})) } $tmp=&find_name("authorized_for_$directives{$_}", \@conf); $in{$_} =~ s/\s+/,/g; if ($tmp) { $cfile->[$tmp->{'line'}]=join('=', "authorized_for_$directives{$_}", $in{$_}); } else { push(@{$cfile}, join('=', "authorized_for_$directives{$_}", $in{$_})); } } &flush_file_lines(); &redirect("edit_auth.cgi"); ### END of save_auth.cgi ###. netsaint/CHANGES0100644000076400000000000000312307126735472012240 0ustar timroot NetSaint Configuration Webmin Module Copyright (C) 1999-2000 by Tim Niemueller, Stephen Nodvin, TeleVideo Global, Inc. Written by Tim Niemueller - http://www.niemueller.de 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. Created : 20.12.1999 Changes ========================================================================================= UNKNOWN - Many undocumented changes, beginning of this CHANGES file on 29.06.2000 29.06.2000 - CHANGES File created (0.80.1) - Smaller fixes (in some places it saved 0 instead of Nothing (""). (0.0.5) - Setup mailinglist - Added Turbo Linux to the list of supported OS - Security Bug solved: Till this version you had to define a default user in CGI authentication ========================================================================================= Send any questions, comments, bug reports etc. to Tim Niemueller The homepage for this module is http://www.niemueller.de/webmin/modules/netsaint/ This module is part of the LinuxMonitor project. You find it's website at http://www.niemueller.de/projects/linuxmonitor/