Target --default--
	server		= %auto-target-name%
	snmp-host	= %server%
	short-desc	= ""

#disk
OID    StorageDescription       1.3.6.1.2.1.25.2.3.1.3
OID    storageSize              1.3.6.1.2.1.25.2.3.1.5
OID    StorageUsed              1.3.6.1.2.1.25.2.3.1.6
OID    StorageBlockSize         1.3.6.1.2.1.25.2.3.1.4
#pros
OID    numOfPros		1.3.6.1.2.1.25.1.6.0
#interface
OID    ifDescription            1.3.6.1.2.1.2.2.1.2
OID    interfaceInBit		1.3.6.1.2.1.2.2.1.10
OID    interfaceOutBit          1.3.6.1.2.1.2.2.1.16
OID    interfaceInUcastPackage  1.3.6.1.2.1.2.2.1.11
OID    interfaceOutUcastPackage	1.3.6.1.2.1.2.2.1.17
OID    interfaceInError		1.3.6.1.2.1.2.2.1.14
OID    interfaceOutError        1.3.6.1.2.1.2.2.1.20
OID    ifInDiscards             1.3.6.1.2.1.2.2.1.13
OID    ifOutDiscards            1.3.6.1.2.1.2.2.1.19
#mail
OID    mailq                    1.3.6.1.2.1.28.1.1.1
#mem
OID    totalMem			1.3.6.1.2.1.25.2.2.0
#nix
OID loadnix                     1.3.6.1.4.1.2021.10.1.5.1
OID memFreenix			1.3.6.1.4.1.2021.4.6.0
OID ssCpuRawUser		1.3.6.1.4.1.2021.11.50.0
OID ssCpuRawSystem		1.3.6.1.4.1.2021.11.52.0
OID ssCpuRawIdle		1.3.6.1.4.1.2021.11.53.0
OID numOfUsersnix		1.3.6.1.2.1.25.1.5.0      #antall brukere på maskinen
OID memShared			1.3.6.1.4.1.2021.4.13.0
OID memBuffer			1.3.6.1.4.1.2021.4.14.0
OID memCached			1.3.6.1.4.1.2021.4.15.0

#windows her har vi brukt spesifike ting for MS og kompilert 
#opp mib'ene selv , se i doc'en før du koker/forandrer noe her !
OID sessionTotalwin		1.3.6.1.4.1.311.1.1.3.1.1.21.1.0        
OID sessionActivewin		1.3.6.1.4.1.311.1.1.3.1.1.21.2.0
OID sessionInactivewin		1.3.6.1.4.1.311.1.1.3.1.1.21.3.0
OID servErrorsLogon		1.3.6.1.4.1.311.1.1.3.1.1.8.8.0
OID servErrorsAccessPermissions	1.3.6.1.4.1.311.1.1.3.1.1.8.9.0
OID servErrorsSystem		1.3.6.1.4.1.311.1.1.3.1.1.8.11.0
OID freeMemwin			1.3.6.1.4.1.311.1.1.3.1.1.1.2.0
OID cpuwin			1.3.6.1.4.1.311.1.1.3.1.1.2.1.3.1.0

datasource memShared
     ds-source   =   snmp://%snmp%/memShared
     rrd-ds-type =   GAUGE
datasource memBuffer
     ds-source   =   snmp://%snmp%/memBuffer
     rrd-ds-type =   GAUGE
datasource memCached
     ds-source   =   snmp://%snmp%/memCached
     rrd-ds-type =   GAUGE
datasource StorageBlockSize
     ds-source   =   snmp://%snmp%/StorageBlockSize.%inst%
     rrd-ds-type =   GAUGE
datasource servErrorsLogon
     ds-source   =   snmp://%snmp%/servErrorsLogon
     rrd-ds-type =   GAUGE
datasource servErrorsAccessPermissions
     ds-source   =   snmp://%snmp%/servErrorsAccessPermissions
     rrd-ds-type =   GAUGE
datasource servErrorsSystem
     ds-source   =   snmp://%snmp%/servErrorsSystem
     rrd-ds-type =   GAUGE
datasource        storageSize
     ds-source   =   snmp://%snmp%/storageSize.%inst%
     rrd-ds-type =   GAUGE
datasource        StorageUsed
     ds-source   =   snmp://%snmp%/StorageUsed.%inst%
     rrd-ds-type =   GAUGE
datasource        numOfUsersnix
     ds-source   =   snmp://%snmp%/numOfUsersnix
     rrd-ds-type =   GAUGE
datasource        numOfPros
     ds-source   =   snmp://%snmp%/numOfPros
     rrd-ds-type =   GAUGE
datasource        interfaceInBit
     ds-source   =   snmp://%snmp%/interfaceInBit.%inst%
     rrd-ds-type =   COUNTER
datasource        interfaceOutBit
     ds-source   =   snmp://%snmp%/interfaceOutBit.%inst%
     rrd-ds-type =   COUNTER
datasource        interfaceInUcastPackage
     ds-source   =   snmp://%snmp%/interfaceInUcastPackage.%inst%
     rrd-ds-type =   COUNTER
datasource        interfaceOutUcastPackage 
     ds-source   =   snmp://%snmp%/interfaceOutUcastPackage.%inst%
     rrd-ds-type =   COUNTER
datasource        interfaceInError
     ds-source   =   snmp://%snmp%/interfaceInError.%inst%
     rrd-ds-type =   COUNTER
datasource        interfaceOutError
     ds-source   =   snmp://%snmp%/interfaceOutError.%inst%
     rrd-ds-type =   COUNTER
datasource        ifInDiscards
     ds-source   =   snmp://%snmp%/ifInDiscards.%inst%
     rrd-ds-type =   COUNTER
datasource        ifOutDiscards
     ds-source   =   snmp://%snmp%/ifOutDiscards.%inst%
     rrd-ds-type =   COUNTER
datasource        totalMem
     ds-source   =   snmp://%snmp%/totalMem
     rrd-ds-type =   GAUGE
datasource        loadnix 
     ds-source   =   snmp://%snmp%/loadnix 
     rrd-ds-type =   GAUGE
datasource        memFreenix
     ds-source   =  snmp://%snmp%/memFreenix
     rrd-ds-type =   GAUGE
datasource ssCpuRawUser
     ds-source   = snmp://%snmp%/ssCpuRawUser
     rrd-ds-type = COUNTER
datasource ssCpuRawSystem
     ds-source   = snmp://%snmp%/ssCpuRawSystem
     rrd-ds-type = COUNTER
datasource ssCpuRawIdle
     ds-source   = snmp://%snmp%/ssCpuRawIdle
     rrd-ds-type = COUNTER
datasource        sessionTotalwin
     ds-source   =  snmp://%snmp%/sessionTotalwin
     rrd-ds-type =   GAUGE
datasource        sessionActivewin
     ds-source   =  snmp://%snmp%/sessionActivewin
     rrd-ds-type =   GAUGE
datasource        sessionInactivewin
     ds-source   =  snmp://%snmp%/sessionInactivewin
     rrd-ds-type =   GAUGE
datasource        freeMemwin
     ds-source   =  snmp://%snmp%/freeMemwin
     rrd-ds-type =   GAUGE
datasource        cpuwin
     ds-source   =  snmp://%snmp%/cpuwin
     rrd-ds-type =   GAUGE
datasource      mailq
     ds-source   =  snmp://%snmp%/mailq
     rrd-ds-type =   GAUGE

# PS! read the  rrdtutorial.html section: "What has been created ?" _before_ you change anything here.
# One pkt per 5 min , reaches 24 timer
# math ex : 5 (min) * 1 (interval) * 288 (factor) = 1440 , 1440/60(min) = 24 (hours)
#rra             5minAve     AVERAGE:0.5:1:288
# et pkt per 30 min går over 7 dager
#  math ex : 5 (min) * 6 (interval) * 336 (factor) = 10080 ,  10080/60(min) = 168 (hours)
#                 168/24(hours in one day) = 7 days.
#rra             30minAve        AVERAGE:0.5:6:336
# One pkt per 2. time , går over 30 dager
#rra             2hrAve          AVERAGE:0.5:12:720
#rra             2hrMax          MAX:0.5:12:720
# et pkt per dag , går over 1 år
#rra             1dayAve         AVERAGE:0.5:288:365
#rra             1dayMax         MAX:0.5:288:365
# et pkt per dag , går over 3 år
#rra             1dayAve         AVERAGE:0.5:288:1095
#rra             1dayMax         MAX:0.5:288:1095
# we will add datasources to each specific target-type later

#targetType      --default--
#        rra     =       "5minAve, 30minAve, 2hrAve, 2hrMax, 1dayAve, 1dayMax"

map interface-name
    base-oid    =   ifDescription
    match       =   %interface-name%

map mount-point
    base-oid    =   StorageDescription
    match       =   %mount-point%

targettype error
        ds = "servErrorsLogon,servErrorsAccessPermissions,servErrorsSystem"
        view = "Logon errors:servErrorsLogon,Access Permision:servErrorsAccessPermissions,System Errors:servErrorsSystem"
targettype mail
        ds = "mailq"
targettype disk
        ds = "storageSize,StorageUsed"
targettype usersnix
        ds = "numOfUsersnix"
targettype userswin
        ds = "sessionTotalwin,sessionActivewin,sessionInactivewin"
targettype processes
        ds = "numOfPros"
targettype memnix
        ds = "totalMem,memFreenix"
targettype memwin
        ds = "totalMem,freeMemwin"
targettype memlin
        ds = "totalMem,memFreenix,memShared,memBuffer,memCached"
targettype cpunix
        ds = "ssCpuRawUser, ssCpuRawSystem, ssCpuRawIdle"
targettype cpuwin
        ds = "cpuwin"
targettype loadnix
        ds = "loadnix"
targettype interface
        ds = "interfaceInBit,interfaceOutBit,interfaceInUcastPackage,interfaceOutUcastPackage,interfaceInError,interfaceOutError,ifOutDiscards"
	view = "Traffic: interfaceInBit interfaceOutBit,Error: interfaceInError interfaceOutError,Discards: ifOutDiscards,Unicast: interfaceInUcastPackage interfaceOutUcastPackage"
targettype userswin
        ds = "sessionTotalwin,sessionActivewin,sessionInactivewin"
	view = "Total sessions: sessionTotalwin,Active sessions: sessionActivewin,Inactive Sessions: sessionInactivewin"

graph --default--
      y-min = 0
      vrule-color = black

graph servErrorsSystem
      si-units = false
      precision = 0
      draw-as = LINE3
      legend  =   "Internal Errors"
      y-axis  =  "Internal Errors"
      units = "Errors"

graph servErrorsAccessPermissions
      si-units = false
      precision = 0
      draw-as = LINE3
      legend  =   "Access Permissions"
      y-axis  =   "Access Permissions"
      units = "Access Permissions"
      
graph servErrorsLogon
      si-units = false
      precision = 0
      draw-as = LINE3
      legend  =   "Logon Errors"
      y-axis  =   "Logon Errors"
      units = "Logon Errors"
      
graph mailq
      units "mail"
      si-units = false
      color  = dark-green
      draw-as= LINE3
      y-axis  =   "Total Number of mails in queue"
      legend  =   "Total Number of mails in queue"
      precision = 0

graph sessionTotalwin
     units  = "Users"
     si-units = false
     color  = dark-green
     draw-as= LINE3
     y-axis  =   "Total Number of sessions"
     legend  =   "Total number of sessions"
     precision = 0

graph sessionActivewin
     units  = "Users"
     si-units = false
     color  = dark-green
     draw-as= LINE3
     y-axis  =   "Number of active sessions"
     legend  =   "Number of active sessions"
     precision = 0

graph sessionInactivewin
     units  = "Users"
     si-units = false
     color  = dark-green
     draw-as= LINE3
     y-axis  =   "Number of inactive sessions"
     legend  =   "Number of inactive sessions"
     precision = 0

graph ssCpuRawUser
      scale = 100,/
      draw-as  = AREA
      legend   = "User CPU Usage "
      si-units = false
      # fixed y-axis, since this is a percentage
      #y-min   =       0
      #y-max   =       100

graph ssCpuRawSystem
     scale = 100,/
     draw-as  = STACK
     legend   = "System CPU Usage "
     si-units = false
     #y-min   =       0
     #y-max   =       100

graph ssCpuRawIdle
     scale = 100,/
     color = magenta
     draw-as  = STACK
     legend   = "System CPU Idle "
     si-units = false

grap  cpuwin
     units  = "%"
     si-units = false
     color  = dark-green
     draw-as = LINE3
     y-axis  =   "Percent CPU utilization"
     legend  =   "CPU utilization"
     y-min   =       0
     y-max   =       100
    
graph loadnix
     scale = 100,/
     si-units = false
     color  = dark-green
     draw-as= AREA
     y-axis  =   "Load"
     legend  =   "Load"
     y-min   =       0
     precision = 2

graph totalMem
     units = "MiB"
     scale = 1024,/
     si-units = false
     color = red
     draw-as= LINE3
     y-axis  =   "memory"
     legend  =   "Total amount of memory"

graph freeMemwin
     units = "MiB"
     scale = 1048576,/
     si-units = false
     color = dark-blue
     draw-as= AREA
     legend  =   "Free memory"
     
graph memFreenix
     #rrd-graph-args = "CDEF:minuser=sds0,sds1,- LINE2:minuser#FF0000:jalla"
     units = "MiB"
     scale = 1024,/
     si-units = false
     color = dark-blue
     draw-as = AREA
     legend  =   "Free memory"

graph memshared
     scale = 1024,/
     si-units = false
     color = green
     draw-as = LINE3
     legend  =   "Total Shared Memory"

graph memBuffer
     scale = 1024,/
     si-units = false
     color = light-purple
     draw-as = LINE3
     legend = "Total Buffered Memory"
     
graph memCached
     scale = 1024,/
     si-units = false
     color = neongrn
     draw-as = LINE3 
     legend = "Total Cached Memory"
     
graph numOfUsersnix
    units = "Users"
    si-units = false
    color = dark-green
    draw-as= LINE3
    legend  =   "Number of users"
    y-axis  =   "Number of users"
    precision = 0

graph numOfPros
   units = "Processes"
   si-units = false
   color = dark-green
   draw-as= LINE2
   legend  =   "Number of processes"
   y-axis  =   "Number of processes"
   precision = 0

graph storageSize
   units = "B"
   scale = %blocksize%,*
   si-units = true
   bytes = true
   color = red
   draw-as= LINE3
   legend  =   "Disk size"

graph StorageUsed
   units = "B"
   scale = %blocksize%,*
   si-units = true
   bytes = true
   color = blue
   draw-as= AREA
   legend  =   "Disk usage"

graph interfaceInBit
    si-units = false
    color = dark-green
    draw-as= AREA
    legend  =   "Traffic in"

graph interfaceOutBit
    si-units = false
    color = blue
    draw-as= Line2
    legend  =   "Traffic out"

graph interfaceInUcastPackage
    si-units = false
    color = dark-green
    draw-as= AREA
    legend  =   "Unicast packages in"

graph  interfaceOutUcastPackage
    si-units = false
    color = blue
    draw-as= Line2
    legend  =   "Unicast packages out"

graph interfaceInError
    si-units = false
    color = dark-green
    draw-as= AREA
    legend  =  "Error in"

graph  interfaceOutError
    si-units = false
    color = blue
    draw-as= Line2
    legend  =  "Error out"

graph ifInDiscards
    si-units = false
    color = dark-green
    draw-as= AREA
    legend  = "Discards in"

graph ifOutDiscards
    si-units = false
    color = blue
    draw-as= Line2
    legend  = "Discards out"


# The HTML dict has bits and pieces of HTML that gets used
# by the grapher.   

html    page-header
	<table width=100%>
	<tr class=header>
		<td width=33% align=left class=header>%auto-title%</td>
		<td width=33% align=center class=header2>NAV-v3</td>
		<td width=33% align=right><a href=/>Back to NAV</a></td>
	</tr>
	</table>
	<h1>%auto-target-path%/%auto-target-name%<br>%short-desc%</h1>

