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    


Windows Memory
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
jengstro
Cacti User


Joined: 15 Nov 2005
Posts: 156

PostPosted: Wed Nov 23, 2005 3:29 pm    Post subject: Reply with quote

Thanks for the links. I read through them both and ended up doing the following...

1. Opened wmimgmt.msc on the remote server and gave 'cactiserviceaccount@domain' Enable and Remote Access.

2. Opened dcomcnfg.exe on the remote server and allowed 'cactiserviceaccount@domain' access to WMI through DCOM.

Yet it still does not allow 'cactiserviceaccount@domain' to get data. Perhaps I misunderstood the documentation?
Back to top
BSOD2600
Cacti Moderator


Joined: 08 May 2004
Posts: 6794
Location: WA, USA

PostPosted: Wed Nov 23, 2005 5:22 pm    Post subject: Reply with quote

Looks good. You'll need to explicity allow DCOM in the windows firewall too. Port 135.
Back to top
jengstro
Cacti User


Joined: 15 Nov 2005
Posts: 156

PostPosted: Wed Nov 23, 2005 5:33 pm    Post subject: Reply with quote

I can open a a telnet session on port 135 but the script still says I'm not allowed to get WMI data.

I double checked the settings but cant see where I missed something.

Is there any other piece that needs to be in place to allow WMI data polling?
Back to top
BSOD2600
Cacti Moderator


Joined: 08 May 2004
Posts: 6794
Location: WA, USA

PostPosted: Wed Nov 23, 2005 6:01 pm    Post subject: Reply with quote

In dcomcnfg -> DCOM -> COM -> Security. You gave your cactiuser rights in both access permissions and launch & activate permissions?

When you're doing the testing if this is working or not, you're logged on as your Cactiuser when running the script, right?
Back to top
jengstro
Cacti User


Joined: 15 Nov 2005
Posts: 156

PostPosted: Mon Nov 28, 2005 10:31 am    Post subject: Reply with quote

Even after your suggested changes I get the same result...

Yes. I am logged in as the cacti user.

Still cant seem to get the data for some reason.


Last edited by jengstro on Mon Nov 28, 2005 3:23 pm; edited 1 time in total
Back to top
jengstro
Cacti User


Joined: 15 Nov 2005
Posts: 156

PostPosted: Mon Nov 28, 2005 12:15 pm    Post subject: Reply with quote

To be a bit more specific...

The path I followed was... "dcomcnfg -> DCOM Config-> COM+ Event System-> Security".

Added "cactiuser@domain" to "Launch Permissions" and "Access Permissions"

When I run the following command... "perl D:/cacti/scripts/w32_query_logicaldisk.pl hostname get freespace,size C:" the following error is returned... "Unable to talk to WMI for hostname."
Back to top
jengstro
Cacti User


Joined: 15 Nov 2005
Posts: 156

PostPosted: Mon Nov 28, 2005 5:48 pm    Post subject: Reply with quote

With security thrown to the side... adding the cactiuser to the local admin group on the remote machines resolved my issue.
Back to top
BSOD2600
Cacti Moderator


Joined: 08 May 2004
Posts: 6794
Location: WA, USA

PostPosted: Mon Nov 28, 2005 7:47 pm    Post subject: Reply with quote

Yea... looking at my setup, thats what I ended up doing too. My cacti is simply for learning/geek purposes so I don't have to really work about security. Maybe I'll look into what needs to be done and create a FAQ about it...
Back to top
jengstro
Cacti User


Joined: 15 Nov 2005
Posts: 156

PostPosted: Tue Nov 29, 2005 11:17 am    Post subject: Reply with quote

That would be cool if you could. The only thing I was able to find was that you have to be a local admin to run a script. Not sure if that matters when your running a query from a remote machine...
Back to top
jengstro
Cacti User


Joined: 15 Nov 2005
Posts: 156

PostPosted: Tue Nov 29, 2005 3:49 pm    Post subject: Reply with quote

I ran into a snag with added the cactiuser to the local adminisrators group on the remote machines... domain controllers.

Anyone have a secure practice to allow the cactiuser just enough rights to read WMI info on a domain controller?
Back to top
BSOD2600
Cacti Moderator


Joined: 08 May 2004
Posts: 6794
Location: WA, USA

PostPosted: Wed Nov 30, 2005 8:03 pm    Post subject: Reply with quote

Alright, I figured it out and wrote a FAQ: http://bsod2600.home.comcast.net/install_windows.html#FAQ. I did this on a Windows 2003 computer from XP Pro.
Back to top
jengstro
Cacti User


Joined: 15 Nov 2005
Posts: 156

PostPosted: Thu Dec 01, 2005 11:33 am    Post subject: Reply with quote

Nice! I will have to check the "Edit Limits" setting and see if it fixes my issues. Thanks for adding that section either way!
Back to top
jengstro
Cacti User


Joined: 15 Nov 2005
Posts: 156

PostPosted: Tue Jan 24, 2006 2:23 pm    Post subject: Reply with quote

Hello all,

Any idea how I can get rid of the hostname input field? It would be ideal if when you add the graph it just pulled the hostname from the host dynamically.

Thanks.
Back to top
rcaston
Cacti User


Joined: 06 Jan 2004
Posts: 199
Location: US-Dallas, TX

PostPosted: Thu Jul 13, 2006 10:01 am    Post subject: odd.. CMDPHP: Poller[0] Host[4] DS Reply with quote

The script works for me when I do it by hand; but for some reason my graphs are all blank;

For some reason the script is returing "U" for the output; even tho when i run it by hand; it returns the values fine...


Log shows the following:

07/13/2006 11:26:07 AM - CMDPHP: Poller[0] Host[4] DS[42] WARNING: Result from CMD not valid. Partial Result: Unable to talk to WM
07/13/2006 11:26:07 AM - CMDPHP: Poller[0] Host[4] DS[42] CMD: perl.exe d:/WWW/cacti/scripts/Lit_W32_OS.pl get MaxProcessMemorySize,TotalVirtualMemorySize,FreeVirtualMemory,TotalVisibleMemorySize,FreePhysicalMemory,SizeStoredInPagingFiles,FreeSpaceInPagingFiles, output: U
07/13/2006 11:26:07 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (42,'','2006-07-13 11:26:00','U')"


If i can do the query by hand (while logged in as the cacti user) and it works, then why would cacti be unable to do it via the scheduled job?



blank.gif
 Description:
 Filesize:  568.8 KB
 Viewed:  3812 Time(s)

blank.gif


Back to top
laurent



Joined: 30 Jan 2006
Posts: 13

PostPosted: Wed Nov 08, 2006 6:17 am    Post subject: Reply with quote

I'm having the same issue as some here , the script runs fine from the command prompt but Nan within cacti graphs ,

D:\wwwroot\MRTG\cacti\scripts>perl lit_w32_os.pl 10.x.x.x get MaxProcessMemorySize,TotalVirtualMemorySize,FreeVirtualMemory,TotalVisibleMemorySize,FreePhysicalMemory,SizeStoredInPagingFiles,FreeSpaceInPagingFiles
MaxProcessMemorySize:2097024 TotalVirtualMemorySize:1197636 FreeVirtualMemory:381884 TotalVisibleMemorySize:1441288 FreePhysicalMemory:443572 SizeStoredInPaging
Files:4096000 FreeSpaceInPagingFiles:4033324

I wonder if the issue comes from the fact returned results are not only numbers but description+number

Could anyone shae some light , I'm using Cacti version 0.8.6.h

Thanks for your time
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 



Powered by phpBB © 2001, 2005 phpBB Group