Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Jun 16, 2019 2:04 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 61 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: Wed Nov 23, 2005 7:17 am 
Offline
Cacti User

Joined: Wed Dec 29, 2004 7:37 am
Posts: 79
Location: Sweden
Here is what happens ...

Code:
11/23/2005 11:50:17 AM - CACTID: Poller[0] Host[297] DS[21064] SCRIPT: \path\win_uptime.cmd hostname 99.9900, output: cur_uptime:2906263
11/23/2005 11:50:17 AM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (210
64,'','2005-11-23 11:50:01','cur_uptime:2906263')
11/23/2005 11:50:17 AM - CACTID: Poller[0] Host[297] DEBUG: The POPEN returned the following File Descriptor 9


Something seems to be wrong with the way it sends data.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 23, 2005 7:24 am 
Offline

Joined: Tue May 06, 2003 7:48 am
Posts: 16
royce wrote:
I've got the same problem - debugging cacti tells that cacti only sees some of the output vars...

Do the maintainer use cactid och php?


royce,

I'm using the php poller, maybe that is the problem. I tried earlier to use the cactid poller but suddenly there is no data collection at all.

Is there anybody were the scripts are working fine?

Wietze


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 23, 2005 7:32 am 
Offline
Cacti User

Joined: Wed Dec 29, 2004 7:37 am
Posts: 79
Location: Sweden
fixed this.. seems to be another buffer-ouput-problem.

Bound my scripts through a executer-wrapper wich is a basic script that outputs the information in one buffer.

A shell script might look like this one - not that I've converted this to linux instead.

Code:
#!/bin/sh
E=`/usr/share/cacti/scripts/uptime/win_uptime.sh $1 $2`

echo $E
exit 0


Top
 Profile  
 
 Post subject: same here
PostPosted: Wed Nov 23, 2005 7:48 am 
Offline
User avatar

Joined: Mon Dec 20, 2004 3:13 am
Posts: 45
Location: The Netherlands
royce wrote:
chewy009 wrote:
OK, so i installed this on my "production" cacti box and it seems like it's working. Why is the Required (SLA) showing up as 0.0000%? Will the rest of the graph items fill in over time or should they already be there? I rebooted this box yesterday, hence the 0.98 days of uptime. What do you think?


I've got the same problem - debugging cacti tells that cacti only sees some of the output vars...

Do the maintainer use cactid och php?


Same problem here. :cry:

When I run the CMD from the command prompt, I do get good results. All values are returned. But when cacti does it, it only shows "uptime since last reboot" in the graph.

Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 23, 2005 7:58 am 
Offline

Joined: Thu Jun 30, 2005 7:31 am
Posts: 12
Location: Helsinki, Finland
Hi,

I got your nice uptime script working only locally in my Windows 2003 std Server where I am also runnig cacti.

I was not able to get it working with other Devices i.e. Windows Servers which are graphing with cacti.

Please see how the win_uptime.cmd is showing it up.

First with localhost which is working (returns good result) and after even a local host ip 127.0.0.1 does not return a correct result?

C:\Inetpub\wwwroot\scripts\uptime>win_uptime.cmd localhost 99.95
cur_uptime:3569 mean_days:1.59 tot_uptime:5856027 tot_blue:0 tot_downtime:194810
tot_reb:44 avail:96.7804 sla_avail:99.95

C:\Inetpub\wwwroot\scripts\uptime>win_uptime.cmd localhost 99.95
cur_uptime:3570 mean_days:1.59 tot_uptime:5856029 tot_blue:0 tot_downtime:194810
tot_reb:44 avail:96.7804 sla_avail:99.95

C:\Inetpub\wwwroot\scripts\uptime>win_uptime.cmd 172.16.10.251 99.95
tot_blue:1 tot_reb:1 sla_avail:99.95

C:\Inetpub\wwwroot\scripts\uptime>win_uptime.cmd 172.0.0.1 99.95
tot_blue:1 tot_reb:1 sla_avail:99.95

C:\Inetpub\wwwroot\scripts\uptime>

With not working graph I see tot-blue:1 tot-reb:1 sla-avail:99.95 nothing else?

What can be the problem. I cannot use fully qualified domain names for http url? I am not connecting to my cacti server form internet at all.

\xphu

_________________
|Cacti user since 0.8.4|


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 23, 2005 8:25 am 
Offline
Cacti User

Joined: Wed Dec 29, 2004 7:37 am
Posts: 79
Location: Sweden
wvr120364 wrote:
royce wrote:
I've got the same problem - debugging cacti tells that cacti only sees some of the output vars...

Do the maintainer use cactid och php?


royce,

I'm using the php poller, maybe that is the problem. I tried earlier to use the cactid poller but suddenly there is no data collection at all.

Is there anybody were the scripts are working fine?

Wietze



Script works with cacti here now. Solution was to create that wrapper script and use that instead. read my erlier porst.

I use cactid.


Top
 Profile  
 
 Post subject: RE: royce
PostPosted: Wed Nov 23, 2005 8:40 am 
Offline
User avatar

Joined: Mon Dec 20, 2004 3:13 am
Posts: 45
Location: The Netherlands
I see youre post on the wrapper but I don't get it. How does this work on a windows server?

Should this wrapper replace any files? Could you explain how this helps?


Top
 Profile  
 
 Post subject: Re: RE: royce
PostPosted: Wed Nov 23, 2005 9:22 am 
Offline
Cacti User

Joined: Wed Dec 29, 2004 7:37 am
Posts: 79
Location: Sweden
proohu01 wrote:
I see youre post on the wrapper but I don't get it. How does this work on a windows server?

Should this wrapper replace any files? Could you explain how this helps?


The reason cacti does'nt read all input fields from the script (win_uptime.cmd) is that, AFAIK, the output is buffered in sections instead of a whole string.

So my solution was tell cacti call another script which basically call the original script and echo the output at one time.


Top
 Profile  
 
 Post subject: uptime.exe
PostPosted: Wed Nov 23, 2005 9:42 am 
Offline

Joined: Thu Jun 30, 2005 7:31 am
Posts: 12
Location: Helsinki, Finland
Hi,

I think I found the solution for my earlier post.

http://support.microsoft.com/kb/q232243/

So I need to set up correct user privileges for my cacti network.

\xphu

_________________
|Cacti user since 0.8.4|


Top
 Profile  
 
 Post subject: It is working....
PostPosted: Wed Nov 23, 2005 12:41 pm 
Offline
User avatar

Joined: Mon Dec 20, 2004 3:13 am
Posts: 45
Location: The Netherlands
It's working now.

The only thing I did was to change the poller from cactid to cmd.php. Somehow the CMD.PHP works better for this script.


Top
 Profile  
 
 Post subject: Re: RE: royce
PostPosted: Tue Nov 29, 2005 11:11 am 
Offline

Joined: Wed Jun 15, 2005 1:18 pm
Posts: 38
Location: Washington State, USA
royce wrote:
proohu01 wrote:
I see youre post on the wrapper but I don't get it. How does this work on a windows server?

Should this wrapper replace any files? Could you explain how this helps?


The reason cacti does'nt read all input fields from the script (win_uptime.cmd) is that, AFAIK, the output is buffered in sections instead of a whole string.

So my solution was tell cacti call another script which basically call the original script and echo the output at one time.


Royce,
Not to be completely dumb here, but can give me a step-by-step on what you did. I don't fully understand what you mean here. :oops: Is there a file you can post? I have to use cactid due to the number of graphs I have. Thx.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 01, 2005 8:44 am 
Offline
User avatar

Joined: Tue Nov 15, 2005 9:39 am
Posts: 18
Location: Paris, FRANCE
This is the script you can use under windows to call the original win_uptime.cmd script.

this new script must be declared in the "data input method" in place of win_uptime:

@echo off
set templog=C:\bvra\cacti\scripts\uptime\tempo_%1.log
call C:/bvra/cacti/scripts/uptime/win_uptime.cmd %1 %2 > %templog%
type %templog%
del C:\bvra\cacti\scripts\uptime\tempo_%1.log

and it works fine now:


Attachments:
uptimewin.JPG
uptimewin.JPG [ 61.26 KiB | Viewed 15293 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 01, 2005 1:40 pm 
Offline

Joined: Wed Nov 30, 2005 6:41 pm
Posts: 8
Location: Anchorage, Alaska
I am having permission issues. If I run the script as a domain admin I get data. If I let system run it from the cacti poller I get no data. One of the notes on the install for win2003 was to not use a domain account becauce of issues. They suggest using the local system account. Anyone have any ideas on which direction I should go.

Michael


Top
 Profile  
 
 Post subject: This might help...
PostPosted: Fri Dec 02, 2005 10:30 am 
Offline
User avatar

Joined: Mon Dec 20, 2004 3:13 am
Posts: 45
Location: The Netherlands
I used a domain account and placed that account into the local administrators group on the remote servers. That way the account should have the right permissions to query WMI from a remote host.

Use that domain account to schedule the poller. The problem you may see with that is that the poller pops up many time when logged on to the cacti server with that same account. I suggest you us an account that you would not normally use when you logon to the server.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 02, 2005 1:04 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12160
Location: USA
If you read my faq, I recently created one on how to properly set up WMI so a normal user can query a remote computer.

_________________

| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 61 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group