|
|
| Author |
Message |
royce Cacti User
Joined: 29 Dec 2004 Posts: 79 Location: Sweden
|
Posted: Fri Feb 11, 2005 10:45 am Post subject: Cactid - feature or bug? |
|
|
Hi.
cactid fails to read variables from a script when a space character exist at the end. Would it be possible for cactid to format the output before processing it so it became more fault tolerant?
Below is perl,
$string =~ s/.$//;
I'm using lastest cactid (0.8.6c)
Christofer |
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9671 Location: MI, USA
|
Posted: Sat Feb 12, 2005 4:13 pm Post subject: |
|
|
Your perl doesn't help me much. Could you provide an example of what type of output would fail. Use double quotes to show space.
TheWitness |
|
| Back to top |
|
 |
royce Cacti User
Joined: 29 Dec 2004 Posts: 79 Location: Sweden
|
Posted: Mon Feb 14, 2005 2:12 am Post subject: |
|
|
Sure!
I am using a perl script to fetch WMI:MsDNS information from a Windows server. The output looks like this,
Sending a wmi-request from the poller box,
| Code: |
$/scripts/win32_wmi_msdns -h our-dns-server |
The output (Qouted, as per your request)
| Code: |
"Total:1622858 Notify:0 Update:19881 TKeyNego:2448 Standard:1600529 A:1472562 NS:1067 SOA:18837 MX:7563 PTR:1229 SRV:98840 ALL:0 IXFR:0 AXFR:1 Other:430 " |
cactid thinks
| Code: |
02/11/2005 01:26:27 PM - CACTID: Poller[0] Host[27] WARNING: Result from SCRIPT not valid. Partial Result: Total:1610661 Notify...
02/11/2005 01:26:27 PM - CACTID: Poller[0] Host[27] SCRIPT: /scripts/win32_wmi_msdns -h our-dns-server, output: U
02/11/2005 01:26:27 PM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (351
,'','2005-02-11 13:25:02','U')
02/11/2005 01:26:27 PM - CACTID: Poller[0] Host[27] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function |
So i solved this issue by removing the last "space" at the end from the output.
christofer |
|
| Back to top |
|
 |
BSOD2600 Cacti Moderator
Joined: 08 May 2004 Posts: 6771 Location: WA, USA
|
|
| Back to top |
|
 |
royce Cacti User
Joined: 29 Dec 2004 Posts: 79 Location: Sweden
|
Posted: Mon Feb 14, 2005 12:41 pm Post subject: |
|
|
What script I use doesnt matter in this case. Please reread thread.
Christofer |
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9671 Location: MI, USA
|
Posted: Mon Mar 14, 2005 8:44 pm Post subject: |
|
|
Blank space at end of script causes CACTID to ignore data.
TheWitness |
|
| Back to top |
|
 |
royce Cacti User
Joined: 29 Dec 2004 Posts: 79 Location: Sweden
|
Posted: Tue Mar 15, 2005 4:04 pm Post subject: |
|
|
| TheWitness wrote: | Blank space at end of script causes CACTID to ignore data.
|
Not in my case. Here cactid whinks that space at the end is just a delimiter, and waits for more data.
Christofer |
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9671 Location: MI, USA
|
Posted: Tue Mar 15, 2005 6:16 pm Post subject: |
|
|
Sorry, please let me restate. If you have a blank at the end of your script output, Cactid will Vomit intentionally.
TheWitness |
|
| Back to top |
|
 |
royce Cacti User
Joined: 29 Dec 2004 Posts: 79 Location: Sweden
|
Posted: Wed Mar 16, 2005 2:16 am Post subject: |
|
|
So you say it's a feature. I think it's a bug.
Christofer |
|
| Back to top |
|
 |
rony Developer/Forum Admin
Joined: 17 Nov 2003 Posts: 5448 Location: Wisconsin, USA
|
Posted: Wed Mar 16, 2005 8:24 am Post subject: |
|
|
 |
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9671 Location: MI, USA
|
Posted: Wed Mar 16, 2005 9:04 am Post subject: |
|
|
Feature. Although, I could trim the string to make it a little happier but not without a cost (CPU Cycles).
TheWitness |
|
| Back to top |
|
 |
royce Cacti User
Joined: 29 Dec 2004 Posts: 79 Location: Sweden
|
Posted: Wed Mar 16, 2005 3:02 pm Post subject: |
|
|
Yea well.
This would stop lots of stupid "Hey, my cactid wont poll blah, I just get U: ..., what's wrong" -questions
I think cacti/cactid is great anyway.
Christofer |
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9671 Location: MI, USA
|
Posted: Wed Mar 16, 2005 8:32 pm Post subject: |
|
|
Christopher,
I do understand. The new check did catch a few people during thier upgrades, but the lions share have revised thier scripts. I am working on a new release to Cactid as we speak. I'll see what I can do.
Thanks,
Larry |
|
| Back to top |
|
 |
|