Hi all, I need to make a script that is collecting data from remote hosts more general: unfortunately I'm not able to make the port number as a variable.
Now in the "data input method" I have the command line "perl <path_cacti>/scripts/script.pl <hostname>:<port>".
In the input fields I have "hostname". The Field [Input] is "hostname", then the "Special Type Code" is hostname.
I think this "hostname" comes from the "Devices" > "machine" page, hostname field.
How can I make the port a variable that I can fill during the creation of the device?
Thanks
Marco
Input fields
Moderators: Developers, Moderators
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Input fields
Please make use of
Honestly, this won't work in case you are using SNMP on that host and not only scripts.
In this case, you'll have to create a new input parameter, like "script_port". Now, each time you create a graph using a data template which refers to this script, you will be prompted to enter a "script_port".
R.
You can pass the SNMP port to that script.Special Type Code
If this field should be treated specially by host templates, indicate so here. Valid keywords for this field are 'hostname', 'host_id', 'snmp_community', 'snmp_username', 'snmp_password', 'snmp_auth_protocol', 'snmp_priv_passphrase', 'snmp_priv_protocol', 'snmp_context', 'snmp_version', 'snmp_port', 'snmp_timeout'
Honestly, this won't work in case you are using SNMP on that host and not only scripts.
In this case, you'll have to create a new input parameter, like "script_port". Now, each time you create a graph using a data template which refers to this script, you will be prompted to enter a "script_port".
R.
Who is online
Users browsing this forum: No registered users and 0 guests