#
# System wide .tknetmonrc file
#
#
set appName       "TkNetmon"
set appVersion "2.0.7a"
set maxX          800
set maxY          600
set globalBG      black
set globalFG      white
set menuVisible   "yes"
set scrollVisible "yes"
set statusVisible "yes"
set editEnable    "yes"
#
if { $tcl_platform(platform)=="unix"} {
    # This acceptable  on 19" screen with 1280x1024
    option  add   *Label.font "-cronyx-helvetica-medium-r-normal-*-*-100-*-*-p-*-koi8-r"
    option  add   *Menu.font  "-cronyx-helvetica-medium-r-normal-*-*-100-*-*-p-*-koi8-r"
    option  add   *Button.font "-cronyx-helvetica-bold-r-normal-*-*-100-*-*-p-*-koi8-r"
    option  add   *Entry.font "-cronyx-helvetica-medium-r-normal-*-*-100-*-*-p-*-koi8-r"
    option  add   *Text.font "-cronyx-helvetica-medium-r-normal-*-*-100-*-*-p-*-koi8-r"
    option  add   *Table.font "-cronyx-helvetica-medium-r-normal-*-*-100-*-*-p-*-koi8-r"
    option  add   *Tabset.font "-cronyx-helvetica-medium-r-normal-*-*-100-*-*-p-*-koi8-r"
    option  add   *Radiobutton.font "-cronyx-helvetica-bold-r-normal-*-*-100-*-*-p-*-koi8-r"
    option  add   *Checkbutton.font "-cronyx-helvetica-bold-r-normal-*-*-100-*-*-p-*-koi8-r"
    #
    option  add   *showErrorLog*Text.font "Courier 12"
    #
    #  On 19" screen with 1600x1200 better use
    #	"-cronyx-helvetica-bold-r-normal-*-*-140-*-*-p-*-koi8-r"
    #
    set headerFont	"-cronyx-helvetica-bold-r-normal-*-*-100-*-*-p-*-koi8-r"
    set textFont      "-cronyx-helvetica-medium-r-normal-*-*-100-*-*-p-*-koi8-r"
    set nodeFont      "-cronyx-helvetica-medium-r-normal-*-*-100-*-*-p-*-koi8-r"
    set docPath	  "file:///usr/local/share/doc/$appName-$appVersion"
    set soundCtrlCmd  "[ file join $::app_path libexec SndCtrl.tcl ] &"
    set soundPlayCmd  "esdplay"
    set browserProg   "mozilla"
    set tempPath      "/tmp"
    #
    # Where to write logs and errors
    # 
    set myLogFile     "~/.Tknetmon/TkNetmon.log"
    # 
    # Simple service menu  definition
    #
    array set menuConfigArray {
     	   0 { 1 {Default}	{type menu}} 
    	   1 { 2 {Ping}	{type command cmd_line {/usr/X11R6/bin/xterm -e sh -c "ping %H; echo 'Press <ENTER> to exit.'; read K;"} } }
    	   2 { 2 {Trace}	{type command cmd_line {/usr/X11R6/bin/xterm -e sh -c "traceroute %H; echo 'Press <ENTER> to exit.'; read K;"} } }
	   3 { 2 {Log} 	{type function cmd_line {showObjectEventsLog {} } } }
 	   4 { 1 {WinNT}	{type menu}} 
	   5 { 2 {Ping}	{type command cmd_line {/usr/X11R6/bin/xterm -e sh -c "ping %H; echo 'Press <ENTER> to exit.'; read K;"} } }
	   6 { 2 {Trace}	{type command cmd_line {/usr/X11R6/bin/xterm -e sh -c "traceroute %H; echo 'Press <ENTER> to exit.'; read K;"} } }
	   7 { 2 {Log} 	{type function cmd_line {showObjectEventsLog {} } } }
	   8 { 2 {VNC} 	{type command cmd_line {/usr/X11R6/bin/vncviewer %H -passwd .vnc/passwd.%N } } }
 	   9 { 1 {Cisco}	{type menu}} 
	   10 { 2 {Ping}	{type command cmd_line {/usr/X11R6/bin/xterm -e sh -c "ping %H; echo 'Press <ENTER> to exit.'; read K;"} } }
	   11 { 2 {Trace}	{type command cmd_line {/usr/X11R6/bin/xterm -e sh -c "traceroute %H; echo 'Press <ENTER> to exit.'; read K;"} } }
	   12 { 2 {Log} 	{type function cmd_line {showObjectEventsLog {} } } }
	   13 { 2 {Telnet} 	{type command cmd_line {/usr/X11R6/bin/xterm -bg black -fg white -e telnet %H } } }
 	   14 { 1 {UNIX}	{type menu}} 
	   15 { 2 {Ping}	{type command cmd_line {/usr/X11R6/bin/xterm -e sh -c "ping %H; echo 'Press <ENTER> to exit.'; read K;"} } }
	   16 { 2 {Trace}	{type command cmd_line {/usr/X11R6/bin/xterm -e sh -c "traceroute %H; echo 'Press <ENTER> to exit.'; read K;"} } }
	   17 { 2 {Log} 	{type function cmd_line {showObjectEventsLog {} } } }
	   18 { 2 {SSH} 	{type command cmd_line {/usr/X11R6/bin/xterm -bg black -fg white -e ssh %H } } }
    }   
#
#
#  
} elseif { $tcl_platform(platform)=="windows" } {
    puts "$appName not supported on this platform."
    exit;
} else {
	puts "Unknown paltform: $tcl_platform(platform)"
	exit
}
# Common settings
set timeFmt	"%d/%m/%G %z %H:%M:%S"
set userName    "netmon"
set groupName   "netmon"
set chRootDir   ""
set dataSaveInterval 300
# Line settings
set lineWidth     1
set lineColor     white
# Text settings
set textAnchor    center
set textJust      center
set textFontColor white
# Link settings
set linkWidth     1
set linkColor     white
# Node settings
set nodeIP	  "127.0.0.1"
set nodeIcon      pc32
set nodeUpSound	  Up
set nodeDownSound Down
set nodeFontColor white
set nodeJust	  center
set nodePoll      60
set nodeRetr      3
set nodeTmo       2
set node_SrcIP	  "0.0.0.0"
set node_SnmpVer  ""
set node_getCommunity	"public"	
set node_trapCommunity	"auhtung"	
set node_dblClickCmd    "NodeReport.tcl %X %P %N"
#
# 
# Number of flashes when node state changed
set ::node_FlashCnt	20
#
array set ::stateColor [list UP green DEGRADED yellow WARN yellow DOWN red UNKNOWN grey NONE grey ]
array set ::stateSignal [list UP signalUP DEGRADED signalDGRD WARN signalWARN DOWN signalDOWN UNKNOWN signalUNK NONE signalUNK ]
#
set ::DevTable [ file join $::app_path devices devtable ]
#
# hosts autoplacement distances, in pixels
#
set ::h_autoplacement 64 
set ::w_autoplacement 92 
# auto align while moving
set ::h_align   8
set ::w_align   8
#
set monitor_mode	"disable"
set netStateServer	"localhost"
set netStateServerPort	"3333"
set netStateServerTimeout 3
# threaded netmond
#set netStateServerTimeout_enable false 
# non-threaded  netmond
set netStateServerTimeout_enable true 
set netStateServerAccess [list "permit:^localhost$" "permit:^127\.0\.0\.1$" "deny:.*" ]
set daemonRestartCmd 	{sudo -u root  /usr/local/sbin/netmondctl restart}
set rootDir		"/var/netmon"
set daemonPermittedHosts {localhost}
# 
# Time period to request data from netstate server, milliseconds
#
set dataReloadPeriod 5000
#
set ifGroupList [list]
array set ifGroupDefinition [list]
#
set targetList  [ list ]
set snmpList    [ list ]
set snmpVarsList [ list ]
# suppress domain from host name while adding host from discovery table
set supressDomain 1
#
proc Dummy { args } { }
set functionList {Dummy}
#
set background  "background.gif"
#
# This file included in config before first object  
#
set predIncludeFile	""
#
# This file included in config after all 
#
set postIncludeFile	""
#
# Various commands for hosts discovery
#
set fping_command	"/usr/local/sbin/fping -ag "
set snmpget_command	"/usr/local/bin/snmpget -Oqs -v 1 -c "
set snmpwalk_command	"/usr/local/bin/snmpwalk -Oqs -v 1 -c "
set snmpget_n_command	"/usr/local/bin/snmpget -Oqn -v 1 -c "
set snmpwalk_n_command	"/usr/local/bin/snmpwalk -Oqn -v 1 -c "
set netstat_command	"/usr/bin/netstat -nr"
set host_command	"/usr/bin/host"
set nslookup_command	"/usr/sbin/nslookup"
#
set fileHistory [list]
# 
set pollMethodsInternal  [ list ping snmp router dns radius ]
set pollMethods  $pollMethodsInternal
array set pollMBodyArray [ list ]
#
set saveMethodsInternal  [ list router interface bgp]
set saveMethods $saveMethodsInternal
array set saveMBodyArray [ list ]
#
set trapMethodsInternal  [ list generic ]
set trapMethods $trapMethodsInternal
array set trapMBodyArray [ list ]
#
# Some predefined methods.
#
lappend saveMethods object-sql-log
lappend saveMethods subobject-sql-log
set saveMBodyArray(object-sql-log) [ join [ list "" \
"	Pipe \"/usr/local/lib/$appName-$appVersion/libexec/object-sql-log.tcl\"" \
{	State "$NAME changed to $state"
} ] "\n" ]
set saveMBodyArray(subobject-sql-log) [ join [list "" \
"	Pipe \"/usr/local/lib/$appName-$appVersion/libexec/subobject-sql-log.tcl\"" \
{	State "$$NAME $NAME state changed to $state ( $ifAlias )"
	When  "$ifSpeed.old && $ifSpeed != $ifSpeed.old" 0
		"$$NAME $NAME BandWidth $ifSpeed.old -> $ifSpeed ($ifAlias)"
} ] "\n" ]
#
set nodeMethodsList [list {"Method" "ping" ""} ]
#
#
set GUI_pregenerate_list	[ list ]
#
