[HELP] Input Field>Special Type Code defined as description
Moderators: Developers, Moderators
-
- Posts: 18
- Joined: Thu Sep 22, 2016 4:25 am
[HELP] Input Field>Special Type Code defined as description
Hi all,
Need your support.
We have a script in the Data Input Method, that was working with the "Input Fields > Special Type Code" defined as description.
This was working correctly until we had a problem in Cacti and needed to reinstall it.
Before the problem we had the Cacti 0.8.8a and now we have the 0.8.8b.
Our devices are defined with:
Description = hostname
Hostname = IP address
The script is define as:
/usr/bin/perl <path_cacti>/scripts/test_script.pl <HOST> <GRAPH>
Where HOST is supposed to be the hostname, that in our case is the description and GRAPH is the graph name.
When the script was working correctly this was created as:
Script: /usr/bin/perl /usr/share/cacti/scripts/test_script.pl TESTHOST1 HTTP_RESPONSE_TIME
RRD: /usr/share/cacti/rra/1179/316270.rrd
Now we have:
Script: /usr/bin/perl /usr/share/cacti/scripts/test_script.pl HTTP_RESPONSE_TIME
RRD: /usr/share/cacti/rra/1179/316271.rrd
As you see the <HOST> input field is not field.
Can anyone help with this? What could be the problem?
Thanks in advance, with best regards,
JTSM
Need your support.
We have a script in the Data Input Method, that was working with the "Input Fields > Special Type Code" defined as description.
This was working correctly until we had a problem in Cacti and needed to reinstall it.
Before the problem we had the Cacti 0.8.8a and now we have the 0.8.8b.
Our devices are defined with:
Description = hostname
Hostname = IP address
The script is define as:
/usr/bin/perl <path_cacti>/scripts/test_script.pl <HOST> <GRAPH>
Where HOST is supposed to be the hostname, that in our case is the description and GRAPH is the graph name.
When the script was working correctly this was created as:
Script: /usr/bin/perl /usr/share/cacti/scripts/test_script.pl TESTHOST1 HTTP_RESPONSE_TIME
RRD: /usr/share/cacti/rra/1179/316270.rrd
Now we have:
Script: /usr/bin/perl /usr/share/cacti/scripts/test_script.pl HTTP_RESPONSE_TIME
RRD: /usr/share/cacti/rra/1179/316271.rrd
As you see the <HOST> input field is not field.
Can anyone help with this? What could be the problem?
Thanks in advance, with best regards,
JTSM
Last edited by jtsmartins on Fri Jan 20, 2017 5:05 am, edited 1 time in total.
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: [HELP] Input Field>Special Type Code defined as descript
You could edit the include/global_form.php file and add the "description" filed to the list of VALID_HOST_FIELDS variable so it looks like this:
Then do a "Rebuild Poller Cache" from the "System Utilities"
Code: Select all
if (!defined('VALID_HOST_FIELDS')) {
$string = api_plugin_hook_function('valid_host_fields', '(hostname|description|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)');
define('VALID_HOST_FIELDS', $string);
}
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
-
- Posts: 18
- Joined: Thu Sep 22, 2016 4:25 am
Re: [HELP] Input Field>Special Type Code defined as descript
Hi phalek,
Thanks for your reply. Sorry for asking, but do we have any other way of doing this without rebuilding the poller? I'm asking this because if we rebuild the poller this will take a huge time, what will cause a very big impact in our daily work.
Cheers,
JTSM
Thanks for your reply. Sorry for asking, but do we have any other way of doing this without rebuilding the poller? I'm asking this because if we rebuild the poller this will take a huge time, what will cause a very big impact in our daily work.
Cheers,
JTSM
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: [HELP] Input Field>Special Type Code defined as descript
Ni,
Not sure. The change actualy only occurred after re-saving the device itself. Seems like it gets updated then only.
You can try applying the change, then go to one of the affected devices and hit the "save" button. Then go to the Utilities menu and check the "View Poller Cache". Search for that device and look at the command displayed.
Not sure. The change actualy only occurred after re-saving the device itself. Seems like it gets updated then only.
You can try applying the change, then go to one of the affected devices and hit the "save" button. Then go to the Utilities menu and check the "View Poller Cache". Search for that device and look at the command displayed.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
-
- Posts: 18
- Joined: Thu Sep 22, 2016 4:25 am
Re: [HELP] Input Field>Special Type Code defined as descript
Ok, so this is only if the node was wrongly created... so, if we change this the new nodes will be created with the description, am I right?
Cheers,
JTSM
Cheers,
JTSM
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: [HELP] Input Field>Special Type Code defined as descript
No, the node wasn't wrongly created. The new field simply only get's filled with information when hitting the save button.
Remember, it's a manual code change, so every device before adding this code will not have the "description" tag filled with any information
Remember, it's a manual code change, so every device before adding this code will not have the "description" tag filled with any information
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
-
- Posts: 18
- Joined: Thu Sep 22, 2016 4:25 am
Re: [HELP] Input Field>Special Type Code defined as descript
Yes, sorry... wrong usage of words.
I used node when I was meaning to say graph/data source. We manually created the graph/data source, in other words - manually add the device name, after finding this issue, se we wont have any issues in the poller cache.
I think that your suggestion will only affect new graphs/data sources, so I'm thinking that the poller cache is not needed, have you tried it out?
Thanks, cheers,
JTSM
I used node when I was meaning to say graph/data source. We manually created the graph/data source, in other words - manually add the device name, after finding this issue, se we wont have any issues in the poller cache.
I think that your suggestion will only affect new graphs/data sources, so I'm thinking that the poller cache is not needed, have you tried it out?
Thanks, cheers,
JTSM
-
- Posts: 18
- Joined: Thu Sep 22, 2016 4:25 am
Re: [HELP] Input Field>Special Type Code defined as descript
Ok, just tested and it works without rebuilding the poller cache!
Many thanks!
Cheers,
JTSM
Many thanks!
Cheers,
JTSM
Who is online
Users browsing this forum: No registered users and 4 guests