Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Cactid - feature or bug?

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Unstable Development Versions
Author Message
royce
Cacti User


Joined: 29 Dec 2004
Posts: 79
Location: Sweden

PostPosted: Fri Feb 11, 2005 10:45 am    Post subject: Cactid - feature or bug? Reply with quote

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

PostPosted: Sat Feb 12, 2005 4:13 pm    Post subject: Reply with quote

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

PostPosted: Mon Feb 14, 2005 2:12 am    Post subject: Reply with quote

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: 6769
Location: WA, USA

PostPosted: Mon Feb 14, 2005 11:58 am    Post subject: Reply with quote

Considered using the W32 DNS Statistics Perl Script using WMI script? That works just fine for me on Win2K3.
Back to top
royce
Cacti User


Joined: 29 Dec 2004
Posts: 79
Location: Sweden

PostPosted: Mon Feb 14, 2005 12:41 pm    Post subject: Reply with quote

BSOD2600 wrote:
Considered using the W32 DNS Statistics Perl Script using WMI script? That works just fine for me on Win2K3.


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

PostPosted: Mon Mar 14, 2005 8:44 pm    Post subject: Reply with quote

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

PostPosted: Tue Mar 15, 2005 4:04 pm    Post subject: Reply with quote

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

PostPosted: Tue Mar 15, 2005 6:16 pm    Post subject: Reply with quote

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

PostPosted: Wed Mar 16, 2005 2:16 am    Post subject: Reply with quote

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

PostPosted: Wed Mar 16, 2005 8:24 am    Post subject: Reply with quote

Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9671
Location: MI, USA

PostPosted: Wed Mar 16, 2005 9:04 am    Post subject: Reply with quote

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

PostPosted: Wed Mar 16, 2005 3:02 pm    Post subject: Reply with quote

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

PostPosted: Wed Mar 16, 2005 8:32 pm    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Unstable Development Versions All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group