I can not get Cacti to pass the 'hostname' to a script called by a Script/Command data input method.
My input string is:
/usr/home/cacti/public_html/scripts/processcount.pl <ip> <string>
Input Fields:
Name Field Order Friendly Name
ip 1 ip Delete
string 2 string
IP is set to Special Type Code 'hostname'.
When I create the datasource, in the 'Custom Data' section, Cacti correctly indicates that I want it to use the IP, and displays the IP in question.
Custom Data [data input: ProcessCount]
ip (From Host: 10.1.11.80)
string (which I have set to: httpd)
Yet when I go to full debug mode, I see that Cacti is not sending the IP to the script...
07/25/2008 10:25:00 AM - CACTID: Poller[0] Host[2] DS[1048] SCRIPT: /usr/home/cacti/public_html/scripts/processcount.pl httpd, output: proccount:0
07/25/2008 10:30:01 AM - CACTID: Poller[0] Host[2] DS[1048] SCRIPT: /usr/home/cacti/public_html/scripts/processcount.pl httpd, output: proccount:0
...Notice the double space between .pl and httpd, making it treat what I intended as $string (httpd) being used as $ip.
What step did I miss? I see older versions of Cacti seemed to allow 'management_ip' as the Special Type Code, but that doesn't work here.
'Special Type Code' in Script/Command method
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Interesting, first Repopulate your Poller cache, then view the poller cache for your entry. If Repopulating did not fix it, then change your Data Input Method from "<ip>" to "<hostname>".
Please bear in mind that every time you change a data input method, you have to repopulate your poller cache. It's a bit of a pain. I might fix it some day.
TheWitness
Please bear in mind that every time you change a data input method, you have to repopulate your poller cache. It's a bit of a pain. I might fix it some day.
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Nope, didn't help. In fact, it repopulated it with the same mistake...
07/25/2008 03:21:53 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_item (local_data_id,host_id,action,hostname, snmp_community,snmp_version,snmp_timeout,snmp_username,snmp_password,snmp_port,rrd_name,rrd_path, rrd_num,arg1,arg2,arg3) values (1048,2,1,'10.1.11.80', 'REMOVED','2','1000', '','','161', 'HOST-tor-apache','/usr/home/cacti/public_html/rra/HOST_tor_cira_ca_HOSTtorapache_1048.rrd', '1','/usr/home/cacti/public_html/scripts/processcount.pl httpd ','','')"
07/25/2008 03:21:53 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_item (local_data_id,host_id,action,hostname, snmp_community,snmp_version,snmp_timeout,snmp_username,snmp_password,snmp_port,rrd_name,rrd_path, rrd_num,arg1,arg2,arg3) values (1048,2,1,'10.1.11.80', 'REMOVED','2','1000', '','','161', 'HOST-tor-apache','/usr/home/cacti/public_html/rra/HOST_tor_cira_ca_HOSTtorapache_1048.rrd', '1','/usr/home/cacti/public_html/scripts/processcount.pl httpd ','','')"
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
What version are you running?
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 2 guests