Cacti WMI 3 – Creating A Data Input Method

Cacti WMI 3 – Creating A Data Input Method

Creating A Data Input Method

The next step in the installation is to create a new Data Input Method in Cacti to execute the perl script created in the previous step. To create a new Data Input Method in Cacti perform the following steps :-

  • Logon to Cacti as an Administrative account
  • Click on the Console tab
  • Click on Data Input Methods in the Left Hand Pane
  • Click on Add to create a new Data Input Method
  • Configure the following settings for NameInput Type, and Input String

Name             – WMI-CPU-Load-Data-Input-Template

Input Type   – Script/Command

Input String – perl <path_cacti>/scripts/wmi-cpu-load.pl <user> <password> <host>

  • Click on Create to create the new Data Input Method

Creating The Input Fields

The Input Fields section of the Data Input Method is used to parse the arguments to the script for the user credentials and server name.

To configure the Input Fields perform the following steps :-

  • The screen will now show the Input Fields and Output Fields options
  • Click on Add in the Input Fields
  • Configure the following for the first Input Field

Field [Input]    – user

Friendly Name – username

  • Click on Create to create the first Input Field
  • Click on Add in the Input Fields
  •  Configure the following for the second Input Field

Field [Input]    – password

Friendly Name – password

  • Click on Create to create the second Input Field
  • Click on Add in the Input Fields
  • Configure the following for the third Input Field

Field [Input]    – host

Friendly Name – hostname

Special Type Code – hostname

  • Click on Create to create the third Input Field
  • You should now have three Input Fields created in the Data Input Method
  • Click on Save to save the current configuration

Creating The Output Fields

The Output Fields section of the Data Input Method is used to interpret the results from the script.  The Output Fields names used MUST be the same as the ones configured in the Perl script output in order for the Data Input Method to work.

To configure the Output Fields perform the following steps :-

  • The screen will now show the Input Fields with three Input Fields created and the Output Fields options
  • Click on Add in the Output Fields
  • Configure the following for the first Output Field

Field [Output]    – CPUNo

Friendly Name – CPU Number

Update RRD File – Ticked

  • Click on Create to create the first Output Field
  • Click on Add in the Output Fields
  • Configure the following for the second Output Field

Field [Output]    – Load

Friendly Name – CPU Load

Update RRD File – Ticked

  • Click on Create to create the second Output Field
  • Click on Save to save the Data Input Method