Get Network Traffic Using WMI

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
Eliran
Posts: 19
Joined: Sun Jul 10, 2011 8:22 am

Get Network Traffic Using WMI

Post by Eliran »

Hi,

I am new to Cacti, I am trying to get Network Traffic Using WMI, I have high Network Traffic from my server (Over 500MB/Sec)
I edit a script from Shitworks and created a script to get the info I need.
When I run the script from cmd I get results but in Cacti i get errors, can someone please look and tell me what I am doing wrong?

Thanks

NetworkTraffic.vbs

Code: Select all

'********************************************************************
'*
'* File:           NetworkTraffic.vbs
'* Created:        July 07, 2011
'* Version:        1.0
'*
'*  Main Function:  Retrieves Network Traffic
'*
'*  NetworkTraffic.vbs      [/S <server>] [/G <option>]
'*                         
'*
'* Copyright (C) 2011 Eliboy
'*
'********************************************************************

OPTION EXPLICIT

    'Define constants
    CONST CONST_ERROR                   = 0
    CONST CONST_WSCRIPT                 = 1
    CONST CONST_CSCRIPT                 = 2
    CONST CONST_SHOW_USAGE              = 3
    CONST CONST_PROCEED                 = 4
    CONST CONST_BYTES_RECEIVED_PER_SCE  = "BytesReceivedPersec"
    CONST CONST_BYTES_SENT_PER_SCE      = "BytesSentPersec"
    CONST CONST_BYTES_TOTAL_PER_SCE     = "BytesTotalPersec"
	CONST CONST_CURRENT_BANDWIDTH		= "CurrentBandwidth"


    'Declare variables
    Dim intOpMode, i
    Dim strServer, strUserName, strPassword, strOption 


    'Parse the command line
    intOpMode = intParseCmdLine(strServer     ,  _
                                strUserName   ,  _
                                strOption     ,  _
                                strPassword)


    Select Case intOpMode

        Case CONST_SHOW_USAGE
            Call ShowUsage()

        Case CONST_PROCEED                 
            Call GetCounterVal(strServer     , _
                               strUserName   , _
                               strPassword   , _
                               strOption)

        Case CONST_ERROR
            'Do Nothing

        Case Else                    'Default -- should never happen
            Call Wscript.Echo("Error occurred in passing parameters.")

    End Select

'********************************************************************
'* End of Script
'********************************************************************

'********************************************************************
'*
'* Sub GetCounterVal()
'*
'* Purpose: Lists available disk space on all drives of a machine.
'*
'* Input:   strServer           a machine name
'*          strOutputFile       an output file name
'*          strUserName         the current user's name
'*          strPassword         the current user's password
'*
'* Output:  Results are either printed on screen or saved in strOutputFile.
'*
'********************************************************************
Private Sub GetCounterVal(strServer, strUserName, strPassword, strOption)

    ON ERROR RESUME NEXT
    Dim objService, objEnumerator, objInstance
    Dim strQuery
    
    'Establish a connection with the server.
    If blnConnect("root\cimv2" , _
                   strUserName , _
                   strPassword , _
                   strServer   , _
                   objService  ) Then
        Call Wscript.Echo("")
        Call Wscript.Echo("Please check the server name, " _
                        & "credentials and WBEM Core.")
        Exit Sub
    End If


    Select Case strOption

      Case CONST_BYTES_RECEIVED_PER_SCE

       strQuery = "Select BytesReceivedPersec From Win32_PerfFormattedData_Tcpip_NetworkInterface"

       Set objEnumerator = objService.ExecQuery(strQuery,,0)
       If Err.Number Then
          Wscript.Echo("Error 0x" & CStr(Hex(Err.Number)) & _
                       " occurred during the query.")
          If Err.Description <> "" Then
              Wscript.Echo("Error description: " & Err.Description & ".")
          End If
          Err.Clear
          Exit Sub
       End If

       For Each objInstance in objEnumerator
           If Not (objInstance is nothing) Then

            Wscript.Echo objInstance.BytesReceivedPersec

           End If
           If Err.Number Then
            Err.Clear
           End If
       Next


      Case CONST_BYTES_SENT_PER_SCE

       strQuery = "Select BytesSentPersec From Win32_PerfFormattedData_Tcpip_NetworkInterface"


       Set objEnumerator = objService.ExecQuery(strQuery,,0)
       If Err.Number Then
           Wscript.Echo("Error 0x" & CStr(Hex(Err.Number)) & _
                        " occurred during the query.")
           If Err.Description <> "" Then
               Wscript.Echo("Error description: " & Err.Description & ".")
           End If
           Err.Clear
           Exit Sub
       End If

       For Each objInstance in objEnumerator
           If Not (objInstance is nothing) Then

           Wscript.Echo objInstance.BytesSentPersec

          End If
           If Err.Number Then
               Err.Clear
           End If
       Next

      Case CONST_BYTES_TOTAL_PER_SCE

       strQuery = "Select BytesTotalPersec From Win32_PerfFormattedData_Tcpip_NetworkInterface"


       Set objEnumerator = objService.ExecQuery(strQuery,,0)
       If Err.Number Then
           Wscript.Echo("Error 0x" & CStr(Hex(Err.Number)) & _
                        " occurred during the query.")
           If Err.Description <> "" Then
               Wscript.Echo("Error description: " & Err.Description & ".")
           End If
           Err.Clear
           Exit Sub
       End If

       For Each objInstance in objEnumerator
           If Not (objInstance is nothing) Then

           Wscript.Echo objInstance.BytesTotalPersec

          End If
           If Err.Number Then
               Err.Clear
           End If
       Next


      Case CONST_CURRENT_BANDWIDTH

       strQuery = "Select CurrentBandwidth From Win32_PerfFormattedData_Tcpip_NetworkInterface"


       Set objEnumerator = objService.ExecQuery(strQuery,,0)
       If Err.Number Then
           Wscript.Echo("Error 0x" & CStr(Hex(Err.Number)) & _
                        " occurred during the query.")
           If Err.Description <> "" Then
               Wscript.Echo("Error description: " & Err.Description & ".")
           End If
           Err.Clear
           Exit Sub
       End If

       For Each objInstance in objEnumerator
           If Not (objInstance is nothing) Then

           Wscript.Echo objInstance.CurrentBandwidth

          End If
           If Err.Number Then
               Err.Clear
           End If
       Next

     Case Else

      Wscript.Echo -1

    End Select




End Sub

'********************************************************************
'*
'* Function intParseCmdLine()
'*
'* Purpose: Parses the command line.
'* Input:   
'*
'* Output:  strServer         a remote server ("" = local server")
'*          strUserName       the current user's name
'*          strPassword       the current user's password
'*          strOutputFile     an output file name
'*
'********************************************************************
Private Function intParseCmdLine( ByRef strServer,        _
                                  ByRef strUserName,      _
                                  ByRef strPassword,      _
                                  ByRef strCounter )

    ON ERROR RESUME NEXT

    Dim strFlag
    Dim intState, intArgIter

    If Wscript.Arguments.Count > 0 Then
        strFlag = Wscript.arguments.Item(0)
    End If

    If IsEmpty(strFlag) Then                'No arguments have been received
        intParseCmdLine = CONST_PROCEED
        Exit Function
    End If

    'Check if the user is asking for help or is just confused
    If (strFlag="help") OR (strFlag="/h") OR (strFlag="\h") OR (strFlag="-h") _
        OR (strFlag = "\?") OR (strFlag = "/?") OR (strFlag = "?") _ 
        OR (strFlag="h") Then
        intParseCmdLine = CONST_SHOW_USAGE
        Exit Function
    End If

    'Retrieve the command line and set appropriate variables
     intArgIter = 0
    Do While intArgIter <= Wscript.arguments.Count - 1
        Select Case Left(LCase(Wscript.arguments.Item(intArgIter)),2)
  
            Case "/s"
                If Not blnGetArg("Server", strServer, intArgIter) Then
                    intParseCmdLine = CONST_ERROR
                    Exit Function
                End If
                intArgIter = intArgIter + 1

            Case "/g"
                If Not blnGetArg("Option", strOption, intArgIter) Then
                    intParseCmdLine = CONST_ERROR
                    Exit Function
                End If
                intArgIter = intArgIter + 1

            Case Else 'We shouldn't get here
                Call Wscript.Echo("Invalid or misplaced parameter: " _
                   & Wscript.arguments.Item(intArgIter) & vbCRLF _
                   & "Please check the input and try again," & vbCRLF _
                   & "or invoke with '/?' for help with the syntax.")
                Wscript.Quit

        End Select

    Loop '** intArgIter <= Wscript.arguments.Count - 1

    If IsEmpty(intParseCmdLine) Then _
        intParseCmdLine = CONST_PROCEED

End Function

'********************************************************************
'*
'* Sub ShowUsage()
'*
'* Purpose: Shows the correct usage to the user.
'*
'* Input:   None
'*
'* Output:  Help messages are displayed on screen.
'*
'********************************************************************
Private Sub ShowUsage()

    Wscript.Echo ""
    Wscript.Echo "Lists available disk space on specific drives of a machine."
    Wscript.Echo ""
    Wscript.Echo "SYNTAX:"
    Wscript.Echo "  DiskUtils.vbs [/S <server>]" _
                &"  [/G <option>] [/D <drive letter>]"
    Wscript.Echo ""
    Wscript.Echo "PARAMETER SPECIFIERS:"
    Wscript.Echo "   server        A machine name."
    Wscript.Echo "   option        Is one of the following:"
    Wscript.Echo "                 BytesReceivedPersec"
    Wscript.Echo "                 BytesSentPersec" 
    Wscript.Echo "                 BytesTotalPersec"
    Wscript.Echo "                 CurrentBandwidth"
    Wscript.Echo ""
    Wscript.Echo "   drive letter  A logical drive letter (C:)"
    Wscript.Echo ""
    Wscript.Echo "EXAMPLE:"
    Wscript.Echo "   1.  DiskUtils.vbs /S MyMachine2 /G BytesReceivedPersec "

End Sub

'********************************************************************
'* General Routines
'********************************************************************

'********************************************************************
'* 
'*  Function blnGetArg()
'*
'*  Purpose: Helper to intParseCmdLine()
'* 
'*  Usage:
'*
'*     Case "/s" 
'*       blnGetArg ("server name", strServer, intArgIter)
'*
'********************************************************************
Private Function blnGetArg ( ByVal StrVarName,   _
                             ByRef strVar,       _
                             ByRef intArgIter) 

    blnGetArg = False 'failure, changed to True upon successful completion

    If Len(Wscript.Arguments(intArgIter)) > 2 then
        If Mid(Wscript.Arguments(intArgIter),3,1) = ":" then
            If Len(Wscript.Arguments(intArgIter)) > 3 then
                strVar = Right(Wscript.Arguments(intArgIter), _
                         Len(Wscript.Arguments(intArgIter)) - 3)
                blnGetArg = True
                Exit Function
            Else
                intArgIter = intArgIter + 1
                If intArgIter > (Wscript.Arguments.Count - 1) Then
                    Call Wscript.Echo( "Invalid " & StrVarName & ".")
                    Call Wscript.Echo( "Please check the input and try again.")
                    Exit Function
                End If

                strVar = Wscript.Arguments.Item(intArgIter)
                If Err.Number Then
                    Call Wscript.Echo( "Invalid " & StrVarName & ".")
                    Call Wscript.Echo( "Please check the input and try again.")
                    Exit Function
                End If

                If InStr(strVar, "/") Then
                    Call Wscript.Echo( "Invalid " & StrVarName)
                    Call Wscript.Echo( "Please check the input and try again.")
                    Exit Function
                End If

                blnGetArg = True 'success
            End If
        Else
            strVar = Right(Wscript.Arguments(intArgIter), _
                     Len(Wscript.Arguments(intArgIter)) - 2)
            blnGetArg = True 'success
            Exit Function
        End If
    Else
        intArgIter = intArgIter + 1
        If intArgIter > (Wscript.Arguments.Count - 1) Then
            Call Wscript.Echo( "Invalid " & StrVarName & ".")
            Call Wscript.Echo( "Please check the input and try again.")
            Exit Function
        End If

        strVar = Wscript.Arguments.Item(intArgIter)
        If Err.Number Then
            Call Wscript.Echo( "Invalid " & StrVarName & ".")
            Call Wscript.Echo( "Please check the input and try again.")
            Exit Function
        End If

        If InStr(strVar, "/") Then
            Call Wscript.Echo( "Invalid " & StrVarName)
            Call Wscript.Echo( "Please check the input and try again.")
            Exit Function
        End If
        blnGetArg = True 'success
    End If
End Function

'********************************************************************
'*
'* Function blnConnect()
'*
'* Purpose: Connects to machine strServer.
'*
'* Input:   strServer       a machine name
'*          strNameSpace    a namespace
'*          strUserName     name of the current user
'*          strPassword     password of the current user
'*
'* Output:  objService is returned  as a service object.
'*          strServer is set to local host if left unspecified
'*
'********************************************************************
Private Function blnConnect(ByVal strNameSpace, _
                            ByVal strUserName,  _
                            ByVal strPassword,  _
                            ByRef strServer,    _
                            ByRef objService)

    ON ERROR RESUME NEXT

    Dim objLocator, objWshNet

    blnConnect = False     'There is no error.

    'Create Locator object to connect to remote CIM object manager
    Set objLocator = CreateObject("WbemScripting.SWbemLocator")
    If Err.Number then
        Call Wscript.Echo( "Error 0x" & CStr(Hex(Err.Number)) & _
                           " occurred in creating a locator object." )
        If Err.Description <> "" Then
            Call Wscript.Echo( "Error description: " & Err.Description & "." )
        End If
        Err.Clear
        blnConnect = True     'An error occurred
        Exit Function
    End If

    'Connect to the namespace which is either local or remote

    Set objService = objLocator.ConnectServer (strServer, strNameSpace, _
       strUserName, strPassword)
    ObjService.Security_.impersonationlevel = 3
    If Err.Number then
        Call Wscript.Echo( "Error 0x" & CStr(Hex(Err.Number)) & _
                           " occurred in connecting to server " _
           & strServer & ".")
        If Err.Description <> "" Then
            Call Wscript.Echo( "Error description: " & Err.Description & "." )
        End If
        Err.Clear
        blnConnect = True     'An error occurred
    End If

    'Get the current server's name if left unspecified
    If IsEmpty(strServer) Then
  Call Wscript.Echo( "Empty strServer" )
        Set objWshNet = CreateObject("Wscript.Network")
    strServer     = objWshNet.ComputerName
    End If

End Function


'********************************************************************
'* 
'* Function blnErrorOccurred()
'*
'* Purpose: Reports error with a string saying what the error occurred in.
'*
'* Input:   strIn		string saying what the error occurred in.
'*
'* Output:  displayed on screen 
'* 
'********************************************************************
Private Function blnErrorOccurred (ByVal strIn)

    If Err.Number Then
        Call Wscript.Echo( "Error 0x" & CStr(Hex(Err.Number)) & ": " & strIn)
        If Err.Description <> "" Then
            Call Wscript.Echo( "Error description: " & Err.Description)
        End If
        Err.Clear
        blnErrorOccurred = True
    Else
        blnErrorOccurred = False
    End If

End Function


'********************************************************************
'*                                                                  *
'*                           End of File                            *
'*                                                                  *
'********************************************************************


NetworkTraffic.php

Code: Select all

<?PHP
# $argv[1] is a host
# $argv[2] is one of the following:
#
# BytesReceivedPersec
# BytesSentPersec 
# BytesTotalPersec
# CurrentBandwidth
#

$do_not_read_config = true;

$Return = `cscript //Nologo NetworkTraffic.vbs /s $argv[1] /g $argv[2]`;

print trim($Return);

?>
Get_Windows_Network_Traffic_WMI.xml

Code: Select all

<query>
   <name>Get Windows Network Traffic</name>
   <description>Get Windows Network Traffic From WMI</description>
   <script_path>php |path_cacti|/scripts/NetworkTraffic.php</script_path>
   <arg_index>index</arg_index>
   <arg_query>query</arg_query>
   <arg_get>get</arg_get>
   <arg_num_indexes>num_indexes</arg_num_indexes>
   <index_order>dskDevice:dskMount</index_order>
   <index_order_type>alphabetic</index_order_type>
   <index_title_format>|chosen_order_field|</index_title_format>

   <fields>
      <dskDevice>
         <name>Bytes Received Per sec</name>
         <direction>input</direction>
         <query_name>BytesReceivedPersec</query_name>
      </dskDevice>
	  <dskDevice>
         <name>Bytes Sent Per sec</name>
         <direction>input</direction>
         <query_name>BytesSentPersec</query_name>
      </dskDevice>
	  <dskDevice>
         <name>Bytes Total Per sec</name>
         <direction>input</direction>
         <query_name>BytesTotalPersec</query_name>
      </dskDevice>
	  <dskDevice>
         <name>Current Bandwidth</name>
         <direction>input</direction>
         <query_name>CurrentBandwidth</query_name>
      </dskDevice>
   </fields>
</query>
cacti_graph_template_wmi_-_networktraffic.xml
<cacti>
<hash_000021aa8fba655c648543e2b7dc3310139720>
<name>WMI - NetworkTraffic</name>
<graph>
<t_title></t_title>
<title>|host_description| - NetworkTraffic</title>
<t_image_format_id></t_image_format_id>
<image_format_id>1</image_format_id>
<t_height></t_height>
<height>200</height>
<t_width></t_width>
<width>600</width>
<t_slope_mode></t_slope_mode>
<slope_mode>on</slope_mode>
<t_auto_scale></t_auto_scale>
<auto_scale>on</auto_scale>
<t_auto_scale_opts></t_auto_scale_opts>
<auto_scale_opts>2</auto_scale_opts>
<t_auto_scale_log></t_auto_scale_log>
<auto_scale_log></auto_scale_log>
<t_scale_log_units></t_scale_log_units>
<scale_log_units></scale_log_units>
<t_auto_scale_rigid></t_auto_scale_rigid>
<auto_scale_rigid></auto_scale_rigid>
<t_auto_padding></t_auto_padding>
<auto_padding>on</auto_padding>
<t_export></t_export>
<export>on</export>
<t_upper_limit></t_upper_limit>
<upper_limit>100</upper_limit>
<t_lower_limit></t_lower_limit>
<lower_limit>0</lower_limit>
<t_base_value></t_base_value>
<base_value>1000</base_value>
<t_unit_value></t_unit_value>
<unit_value></unit_value>
<t_unit_exponent_value></t_unit_exponent_value>
<unit_exponent_value></unit_exponent_value>
<t_vertical_label></t_vertical_label>
<vertical_label>NetworkTraffic</vertical_label>
</graph>
<items>
<hash_10002152a0be261dd3a986b8bef90f8b1a3364>
<task_item_id>hash_080021164b9cca878b094391f7d9765c942323</task_item_id>
<color_id>0</color_id>
<alpha>FF</alpha>
<graph_type_id>9</graph_type_id>
<consolidation_function_id>4</consolidation_function_id>
<cdef_id>hash_05002173f95f8b77b5508157d64047342c421e</cdef_id>
<value></value>
<gprint_id>hash_060021e9c43831e54eca8069317a2ce8c6f751</gprint_id>
<text_format>Current:</text_format>
<hard_return></hard_return>
<sequence>1</sequence>
</hash_10002152a0be261dd3a986b8bef90f8b1a3364>
<hash_10002160226d6c63480d4bf1877fe4e861b9b2>
<task_item_id>hash_080021a2a41151ee5a16c010c080d73fc9f4bc</task_item_id>
<color_id>00CF00</color_id>
<alpha>FF</alpha>
<graph_type_id>7</graph_type_id>
<consolidation_function_id>1</consolidation_function_id>
<cdef_id>hash_05002173f95f8b77b5508157d64047342c421e</cdef_id>
<value></value>
<gprint_id>hash_060021e9c43831e54eca8069317a2ce8c6f751</gprint_id>
<text_format>Inbound</text_format>
<hard_return></hard_return>
<sequence>2</sequence>
</hash_10002160226d6c63480d4bf1877fe4e861b9b2>
<hash_1000216da9b833d98fd6a042b5fb1ce45182b3>
<task_item_id>hash_080021a2a41151ee5a16c010c080d73fc9f4bc</task_item_id>
<color_id>0</color_id>
<alpha>FF</alpha>
<graph_type_id>9</graph_type_id>
<consolidation_function_id>4</consolidation_function_id>
<cdef_id>hash_05002173f95f8b77b5508157d64047342c421e</cdef_id>
<value></value>
<gprint_id>hash_060021e9c43831e54eca8069317a2ce8c6f751</gprint_id>
<text_format>Current:</text_format>
<hard_return></hard_return>
<sequence>3</sequence>
</hash_1000216da9b833d98fd6a042b5fb1ce45182b3>
<hash_100021afe3c32eac2312a79ddce4a18f62394b>
<task_item_id>hash_080021a2a41151ee5a16c010c080d73fc9f4bc</task_item_id>
<color_id>0</color_id>
<alpha>FF</alpha>
<graph_type_id>9</graph_type_id>
<consolidation_function_id>1</consolidation_function_id>
<cdef_id>hash_05002173f95f8b77b5508157d64047342c421e</cdef_id>
<value></value>
<gprint_id>hash_060021e9c43831e54eca8069317a2ce8c6f751</gprint_id>
<text_format>Average:</text_format>
<hard_return></hard_return>
<sequence>4</sequence>
</hash_100021afe3c32eac2312a79ddce4a18f62394b>
<hash_100021395e5b8d2143ee184568873aedbad360>
<task_item_id>hash_080021a2a41151ee5a16c010c080d73fc9f4bc</task_item_id>
<color_id>0</color_id>
<alpha>FF</alpha>
<graph_type_id>9</graph_type_id>
<consolidation_function_id>3</consolidation_function_id>
<cdef_id>hash_05002173f95f8b77b5508157d64047342c421e</cdef_id>
<value></value>
<gprint_id>hash_060021e9c43831e54eca8069317a2ce8c6f751</gprint_id>
<text_format>Maximum:</text_format>
<hard_return>on</hard_return>
<sequence>5</sequence>
</hash_100021395e5b8d2143ee184568873aedbad360>
<hash_100021086c217176ba395458ab83d35f9353bd>
<task_item_id>hash_08002157f1fd1efec421b9c02e98884d95fa61</task_item_id>
<color_id>002A97</color_id>
<alpha>FF</alpha>
<graph_type_id>4</graph_type_id>
<consolidation_function_id>1</consolidation_function_id>
<cdef_id>hash_05002173f95f8b77b5508157d64047342c421e</cdef_id>
<value></value>
<gprint_id>hash_060021e9c43831e54eca8069317a2ce8c6f751</gprint_id>
<text_format>Outbound</text_format>
<hard_return></hard_return>
<sequence>6</sequence>
</hash_100021086c217176ba395458ab83d35f9353bd>
<hash_10002182369cae1de3737e7a1aa4e6244e8942>
<task_item_id>hash_08002157f1fd1efec421b9c02e98884d95fa61</task_item_id>
<color_id>0</color_id>
<alpha>FF</alpha>
<graph_type_id>9</graph_type_id>
<consolidation_function_id>4</consolidation_function_id>
<cdef_id>hash_05002173f95f8b77b5508157d64047342c421e</cdef_id>
<value></value>
<gprint_id>hash_060021e9c43831e54eca8069317a2ce8c6f751</gprint_id>
<text_format>Current:</text_format>
<hard_return></hard_return>
<sequence>7</sequence>
</hash_10002182369cae1de3737e7a1aa4e6244e8942>
<hash_10002166d9b041b0c2f712ca037a4af18059bf>
<task_item_id>hash_08002157f1fd1efec421b9c02e98884d95fa61</task_item_id>
<color_id>0</color_id>
<alpha>FF</alpha>
<graph_type_id>9</graph_type_id>
<consolidation_function_id>1</consolidation_function_id>
<cdef_id>hash_05002173f95f8b77b5508157d64047342c421e</cdef_id>
<value></value>
<gprint_id>hash_060021e9c43831e54eca8069317a2ce8c6f751</gprint_id>
<text_format>Average:</text_format>
<hard_return></hard_return>
<sequence>8</sequence>
</hash_10002166d9b041b0c2f712ca037a4af18059bf>
<hash_1000215cba4a1e40a67205bc6d0841e8aeb3a0>
<task_item_id>hash_08002157f1fd1efec421b9c02e98884d95fa61</task_item_id>
<color_id>0</color_id>
<alpha>FF</alpha>
<graph_type_id>9</graph_type_id>
<consolidation_function_id>3</consolidation_function_id>
<cdef_id>hash_05002173f95f8b77b5508157d64047342c421e</cdef_id>
<value></value>
<gprint_id>hash_060021e9c43831e54eca8069317a2ce8c6f751</gprint_id>
<text_format>Maximum:</text_format>
<hard_return>on</hard_return>
<sequence>9</sequence>
</hash_1000215cba4a1e40a67205bc6d0841e8aeb3a0>
</items>
<inputs>
<hash_090021e6cdd195bc2dd654cf6e5b97e48374cb>
<name>Data Source [BytesSentPersec]</name>
<description></description>
<column_name>task_item_id</column_name>
<items>hash_000021086c217176ba395458ab83d35f9353bd|hash_00002182369cae1de3737e7a1aa4e6244e8942|hash_00002166d9b041b0c2f712ca037a4af18059bf|hash_0000215cba4a1e40a67205bc6d0841e8aeb3a0</items>
</hash_090021e6cdd195bc2dd654cf6e5b97e48374cb>
<hash_09002164241ec4374bdc979dac1dc1cdaa2766>
<name>Data Source [BytesReceivedPersec]</name>
<description></description>
<column_name>task_item_id</column_name>
<items>hash_00002160226d6c63480d4bf1877fe4e861b9b2|hash_0000216da9b833d98fd6a042b5fb1ce45182b3|hash_000021afe3c32eac2312a79ddce4a18f62394b|hash_000021395e5b8d2143ee184568873aedbad360</items>
</hash_09002164241ec4374bdc979dac1dc1cdaa2766>
<hash_0900217e4e3ac392c5c437bb061c67e6e518bf>
<name>Data Source [CurrentBandwidth]</name>
<description></description>
<column_name>task_item_id</column_name>
<items>hash_00002152a0be261dd3a986b8bef90f8b1a3364</items>
</hash_0900217e4e3ac392c5c437bb061c67e6e518bf>
</inputs>
</hash_000021aa8fba655c648543e2b7dc3310139720>
<hash_0100218c775f3048e02a741e945e7a9b4e50bb>
<name>WIM - Traffic</name>
<ds>
<t_name></t_name>
<name>|host_description| - Traffic</name>
<data_input_id>hash_03002180e9e4c4191a5da189ae26d0e237f015</data_input_id>
<t_rra_id></t_rra_id>
<t_rrd_step></t_rrd_step>
<rrd_step>300</rrd_step>
<t_active></t_active>
<active>on</active>
<rra_items>hash_150021c21df5178e5c955013591239eb0afd46|hash_1500210d9c0af8b8acdc7807943937b3208e29|hash_1500216fc2d038fb42950138b0ce3e9874cc60|hash_150021e36f3adb9f152adfa5dc50fd2b23337e</rra_items>
</ds>
<items>
<hash_080021a2a41151ee5a16c010c080d73fc9f4bc>
<t_data_source_name></t_data_source_name>
<data_source_name>BytesReceivedPersec</data_source_name>
<t_rrd_minimum></t_rrd_minimum>
<rrd_minimum>0</rrd_minimum>
<t_rrd_maximum>on</t_rrd_maximum>
<rrd_maximum>3000000000</rrd_maximum>
<t_data_source_type_id></t_data_source_type_id>
<data_source_type_id>2</data_source_type_id>
<t_rrd_heartbeat></t_rrd_heartbeat>
<rrd_heartbeat>600</rrd_heartbeat>
<t_data_input_field_id></t_data_input_field_id>
<data_input_field_id>0</data_input_field_id>
</hash_080021a2a41151ee5a16c010c080d73fc9f4bc>
<hash_08002157f1fd1efec421b9c02e98884d95fa61>
<t_data_source_name></t_data_source_name>
<data_source_name>BytesSentPersec</data_source_name>
<t_rrd_minimum></t_rrd_minimum>
<rrd_minimum>0</rrd_minimum>
<t_rrd_maximum>on</t_rrd_maximum>
<rrd_maximum>3000000000</rrd_maximum>
<t_data_source_type_id></t_data_source_type_id>
<data_source_type_id>2</data_source_type_id>
<t_rrd_heartbeat></t_rrd_heartbeat>
<rrd_heartbeat>600</rrd_heartbeat>
<t_data_input_field_id></t_data_input_field_id>
<data_input_field_id>0</data_input_field_id>
</hash_08002157f1fd1efec421b9c02e98884d95fa61>
<hash_0800218108da267838b5032585a87df12e204e>
<t_data_source_name></t_data_source_name>
<data_source_name>BytesTotalPersec</data_source_name>
<t_rrd_minimum></t_rrd_minimum>
<rrd_minimum>0</rrd_minimum>
<t_rrd_maximum>on</t_rrd_maximum>
<rrd_maximum>3000000000</rrd_maximum>
<t_data_source_type_id></t_data_source_type_id>
<data_source_type_id>2</data_source_type_id>
<t_rrd_heartbeat></t_rrd_heartbeat>
<rrd_heartbeat>600</rrd_heartbeat>
<t_data_input_field_id></t_data_input_field_id>
<data_input_field_id>0</data_input_field_id>
</hash_0800218108da267838b5032585a87df12e204e>
<hash_080021164b9cca878b094391f7d9765c942323>
<t_data_source_name></t_data_source_name>
<data_source_name>CurrentBandwidth</data_source_name>
<t_rrd_minimum></t_rrd_minimum>
<rrd_minimum>0</rrd_minimum>
<t_rrd_maximum>on</t_rrd_maximum>
<rrd_maximum>3000000000</rrd_maximum>
<t_data_source_type_id></t_data_source_type_id>
<data_source_type_id>2</data_source_type_id>
<t_rrd_heartbeat></t_rrd_heartbeat>
<rrd_heartbeat>600</rrd_heartbeat>
<t_data_input_field_id></t_data_input_field_id>
<data_input_field_id>0</data_input_field_id>
</hash_080021164b9cca878b094391f7d9765c942323>
</items>
<data>
<item_000>
<data_input_field_id>hash_07002174af2e42dc12956c4817c2ef5d9983f9</data_input_field_id>
<t_value>on</t_value>
<value></value>
</item_000>
<item_001>
<data_input_field_id>hash_0700213b7caa46eb809fc238de6ef18b6e10d5</data_input_field_id>
<t_value>on</t_value>
<value></value>
</item_001>
<item_002>
<data_input_field_id>hash_070021d39556ecad6166701bfb0e28c5a11108</data_input_field_id>
<t_value>on</t_value>
<value></value>
</item_002>
</data>
</hash_0100218c775f3048e02a741e945e7a9b4e50bb>
<hash_03002180e9e4c4191a5da189ae26d0e237f015>
<name>Get Script Data (Indexed)</name>
<type_id>4</type_id>
<input_string></input_string>
<fields>
<hash_070021d39556ecad6166701bfb0e28c5a11108>
<name>Index Type</name>
<update_rra></update_rra>
<regexp_match></regexp_match>
<allow_nulls></allow_nulls>
<type_code>index_type</type_code>
<input_output>in</input_output>
<data_name>index_type</data_name>
</hash_070021d39556ecad6166701bfb0e28c5a11108>
<hash_0700213b7caa46eb809fc238de6ef18b6e10d5>
<name>Index Value</name>
<update_rra></update_rra>
<regexp_match></regexp_match>
<allow_nulls></allow_nulls>
<type_code>index_value</type_code>
<input_output>in</input_output>
<data_name>index_value</data_name>
</hash_0700213b7caa46eb809fc238de6ef18b6e10d5>
<hash_07002174af2e42dc12956c4817c2ef5d9983f9>
<name>Output Type ID</name>
<update_rra></update_rra>
<regexp_match></regexp_match>
<allow_nulls></allow_nulls>
<type_code>output_type</type_code>
<input_output>in</input_output>
<data_name>output_type</data_name>
</hash_07002174af2e42dc12956c4817c2ef5d9983f9>
<hash_0700218ae57f09f787656bf4ac541e8bd12537>
<name>Output Value</name>
<update_rra>on</update_rra>
<regexp_match></regexp_match>
<allow_nulls></allow_nulls>
<type_code></type_code>
<input_output>out</input_output>
<data_name>output</data_name>
</hash_0700218ae57f09f787656bf4ac541e8bd12537>
</fields>
</hash_03002180e9e4c4191a5da189ae26d0e237f015>
<hash_150021c21df5178e5c955013591239eb0afd46>
<name>Daily (5 Minute Average)</name>
<x_files_factor>0.5</x_files_factor>
<steps>1</steps>
<rows>600</rows>
<timespan>86400</timespan>
<cf_items>1|3</cf_items>
</hash_150021c21df5178e5c955013591239eb0afd46>
<hash_1500210d9c0af8b8acdc7807943937b3208e29>
<name>Weekly (30 Minute Average)</name>
<x_files_factor>0.5</x_files_factor>
<steps>6</steps>
<rows>700</rows>
<timespan>604800</timespan>
<cf_items>1|3</cf_items>
</hash_1500210d9c0af8b8acdc7807943937b3208e29>
<hash_1500216fc2d038fb42950138b0ce3e9874cc60>
<name>Monthly (2 Hour Average)</name>
<x_files_factor>0.5</x_files_factor>
<steps>24</steps>
<rows>775</rows>
<timespan>2678400</timespan>
<cf_items>1|3</cf_items>
</hash_1500216fc2d038fb42950138b0ce3e9874cc60>
<hash_150021e36f3adb9f152adfa5dc50fd2b23337e>
<name>Yearly (1 Day Average)</name>
<x_files_factor>0.5</x_files_factor>
<steps>288</steps>
<rows>797</rows>
<timespan>33053184</timespan>
<cf_items>1|3</cf_items>
</hash_150021e36f3adb9f152adfa5dc50fd2b23337e>
<hash_05002173f95f8b77b5508157d64047342c421e>
<name>Turn Bytes into Bits</name>
<items>
<hash_1400219bbf6b792507bb9bb17d2af0970f9be9>
<sequence>1</sequence>
<type>4</type>
<value>CURRENT_DATA_SOURCE</value>
</hash_1400219bbf6b792507bb9bb17d2af0970f9be9>
<hash_140021a4b8eb2c3bf4920a3ef571a7a004be53>
<sequence>2</sequence>
<type>6</type>
<value>8</value>
</hash_140021a4b8eb2c3bf4920a3ef571a7a004be53>
<hash_140021caa4e023ac2d7b1c4b4c8c4adfd55dfe>
<sequence>3</sequence>
<type>2</type>
<value>3</value>
</hash_140021caa4e023ac2d7b1c4b4c8c4adfd55dfe>
</items>
</hash_05002173f95f8b77b5508157d64047342c421e>
<hash_060021e9c43831e54eca8069317a2ce8c6f751>
<name>Normal</name>
<gprint_text>%8.2lf %s</gprint_text>
</hash_060021e9c43831e54eca8069317a2ce8c6f751>
</cacti>
cacti_data_template_wim_-_traffic.xml

Code: Select all

<cacti>	
	<hash_0100218c775f3048e02a741e945e7a9b4e50bb>
		<name>WIM - Traffic</name>
		<ds>
			<t_name></t_name>
			<name>|host_description| - Traffic</name>
			<data_input_id>hash_03002180e9e4c4191a5da189ae26d0e237f015</data_input_id>
			<t_rra_id></t_rra_id>
			<t_rrd_step></t_rrd_step>
			<rrd_step>300</rrd_step>
			<t_active></t_active>
			<active>on</active>
			<rra_items>hash_150021c21df5178e5c955013591239eb0afd46|hash_1500210d9c0af8b8acdc7807943937b3208e29|hash_1500216fc2d038fb42950138b0ce3e9874cc60|hash_150021e36f3adb9f152adfa5dc50fd2b23337e</rra_items>
		</ds>
		<items>
			<hash_080021a2a41151ee5a16c010c080d73fc9f4bc>
				<t_data_source_name></t_data_source_name>
				<data_source_name>BytesReceivedPersec</data_source_name>
				<t_rrd_minimum></t_rrd_minimum>
				<rrd_minimum>0</rrd_minimum>
				<t_rrd_maximum>on</t_rrd_maximum>
				<rrd_maximum>3000000000</rrd_maximum>
				<t_data_source_type_id></t_data_source_type_id>
				<data_source_type_id>2</data_source_type_id>
				<t_rrd_heartbeat></t_rrd_heartbeat>
				<rrd_heartbeat>600</rrd_heartbeat>
				<t_data_input_field_id></t_data_input_field_id>
				<data_input_field_id>0</data_input_field_id>
			</hash_080021a2a41151ee5a16c010c080d73fc9f4bc>
			<hash_08002157f1fd1efec421b9c02e98884d95fa61>
				<t_data_source_name></t_data_source_name>
				<data_source_name>BytesSentPersec</data_source_name>
				<t_rrd_minimum></t_rrd_minimum>
				<rrd_minimum>0</rrd_minimum>
				<t_rrd_maximum>on</t_rrd_maximum>
				<rrd_maximum>3000000000</rrd_maximum>
				<t_data_source_type_id></t_data_source_type_id>
				<data_source_type_id>2</data_source_type_id>
				<t_rrd_heartbeat></t_rrd_heartbeat>
				<rrd_heartbeat>600</rrd_heartbeat>
				<t_data_input_field_id></t_data_input_field_id>
				<data_input_field_id>0</data_input_field_id>
			</hash_08002157f1fd1efec421b9c02e98884d95fa61>
			<hash_0800218108da267838b5032585a87df12e204e>
				<t_data_source_name></t_data_source_name>
				<data_source_name>BytesTotalPersec</data_source_name>
				<t_rrd_minimum></t_rrd_minimum>
				<rrd_minimum>0</rrd_minimum>
				<t_rrd_maximum>on</t_rrd_maximum>
				<rrd_maximum>3000000000</rrd_maximum>
				<t_data_source_type_id></t_data_source_type_id>
				<data_source_type_id>2</data_source_type_id>
				<t_rrd_heartbeat></t_rrd_heartbeat>
				<rrd_heartbeat>600</rrd_heartbeat>
				<t_data_input_field_id></t_data_input_field_id>
				<data_input_field_id>0</data_input_field_id>
			</hash_0800218108da267838b5032585a87df12e204e>
			<hash_080021164b9cca878b094391f7d9765c942323>
				<t_data_source_name></t_data_source_name>
				<data_source_name>CurrentBandwidth</data_source_name>
				<t_rrd_minimum></t_rrd_minimum>
				<rrd_minimum>0</rrd_minimum>
				<t_rrd_maximum>on</t_rrd_maximum>
				<rrd_maximum>3000000000</rrd_maximum>
				<t_data_source_type_id></t_data_source_type_id>
				<data_source_type_id>2</data_source_type_id>
				<t_rrd_heartbeat></t_rrd_heartbeat>
				<rrd_heartbeat>600</rrd_heartbeat>
				<t_data_input_field_id></t_data_input_field_id>
				<data_input_field_id>0</data_input_field_id>
			</hash_080021164b9cca878b094391f7d9765c942323>
		</items>
		<data>
			<item_000>
				<data_input_field_id>hash_07002174af2e42dc12956c4817c2ef5d9983f9</data_input_field_id>
				<t_value>on</t_value>
				<value></value>
			</item_000>
			<item_001>
				<data_input_field_id>hash_0700213b7caa46eb809fc238de6ef18b6e10d5</data_input_field_id>
				<t_value>on</t_value>
				<value></value>
			</item_001>
			<item_002>
				<data_input_field_id>hash_070021d39556ecad6166701bfb0e28c5a11108</data_input_field_id>
				<t_value>on</t_value>
				<value></value>
			</item_002>
		</data>
	</hash_0100218c775f3048e02a741e945e7a9b4e50bb>
	<hash_03002180e9e4c4191a5da189ae26d0e237f015>
		<name>Get Script Data (Indexed)</name>
		<type_id>4</type_id>
		<input_string></input_string>
		<fields>
			<hash_070021d39556ecad6166701bfb0e28c5a11108>
				<name>Index Type</name>
				<update_rra></update_rra>
				<regexp_match></regexp_match>
				<allow_nulls></allow_nulls>
				<type_code>index_type</type_code>
				<input_output>in</input_output>
				<data_name>index_type</data_name>
			</hash_070021d39556ecad6166701bfb0e28c5a11108>
			<hash_0700213b7caa46eb809fc238de6ef18b6e10d5>
				<name>Index Value</name>
				<update_rra></update_rra>
				<regexp_match></regexp_match>
				<allow_nulls></allow_nulls>
				<type_code>index_value</type_code>
				<input_output>in</input_output>
				<data_name>index_value</data_name>
			</hash_0700213b7caa46eb809fc238de6ef18b6e10d5>
			<hash_07002174af2e42dc12956c4817c2ef5d9983f9>
				<name>Output Type ID</name>
				<update_rra></update_rra>
				<regexp_match></regexp_match>
				<allow_nulls></allow_nulls>
				<type_code>output_type</type_code>
				<input_output>in</input_output>
				<data_name>output_type</data_name>
			</hash_07002174af2e42dc12956c4817c2ef5d9983f9>
			<hash_0700218ae57f09f787656bf4ac541e8bd12537>
				<name>Output Value</name>
				<update_rra>on</update_rra>
				<regexp_match></regexp_match>
				<allow_nulls></allow_nulls>
				<type_code></type_code>
				<input_output>out</input_output>
				<data_name>output</data_name>
			</hash_0700218ae57f09f787656bf4ac541e8bd12537>
		</fields>
	</hash_03002180e9e4c4191a5da189ae26d0e237f015>
	<hash_150021c21df5178e5c955013591239eb0afd46>
		<name>Daily (5 Minute Average)</name>
		<x_files_factor>0.5</x_files_factor>
		<steps>1</steps>
		<rows>600</rows>
		<timespan>86400</timespan>
		<cf_items>1|3</cf_items>
	</hash_150021c21df5178e5c955013591239eb0afd46>
	<hash_1500210d9c0af8b8acdc7807943937b3208e29>
		<name>Weekly (30 Minute Average)</name>
		<x_files_factor>0.5</x_files_factor>
		<steps>6</steps>
		<rows>700</rows>
		<timespan>604800</timespan>
		<cf_items>1|3</cf_items>
	</hash_1500210d9c0af8b8acdc7807943937b3208e29>
	<hash_1500216fc2d038fb42950138b0ce3e9874cc60>
		<name>Monthly (2 Hour Average)</name>
		<x_files_factor>0.5</x_files_factor>
		<steps>24</steps>
		<rows>775</rows>
		<timespan>2678400</timespan>
		<cf_items>1|3</cf_items>
	</hash_1500216fc2d038fb42950138b0ce3e9874cc60>
	<hash_150021e36f3adb9f152adfa5dc50fd2b23337e>
		<name>Yearly (1 Day Average)</name>
		<x_files_factor>0.5</x_files_factor>
		<steps>288</steps>
		<rows>797</rows>
		<timespan>33053184</timespan>
		<cf_items>1|3</cf_items>
	</hash_150021e36f3adb9f152adfa5dc50fd2b23337e>
</cacti>
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests