Monitor Windows Service stats from Linux

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
niccos
Posts: 1
Joined: Tue Jun 06, 2006 9:17 am

Post by niccos »

Hello everybody,

This is my first post here.

I'm trying to install the windows services monitoring, and I have some problems.

The used Cacti version is 0.8.6h

I'v changed the field type into the database, and I've changed the string length into the PHP script.

The issue I have is that the "verbose query" works, it means that there is an output with the good service names, but the query is not into the poller cache, even after rebuilding it, it's like as if the query had not been added into the database, it's not into the poller_item table even after a rebuild.

And I really do not know where I have to look for to solve this problem.

I attach a screenshot in order to illustrate what I'm trying to explain.

If someone has allready had this issue, that would be great.

Thanks a lot, and thanks for all work on Cacti.

Niccos
Attachments
verbose_query.jpg
verbose_query.jpg (59.2 KiB) Viewed 18886 times
graph_choice.jpg
graph_choice.jpg (14.39 KiB) Viewed 18887 times
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

niccos wrote: I'm trying to install the windows services monitoring, and I have some problems.
I see from the screen shots that you are using SNMP v1, do you get the same thing when you switch to 2? Just a hunch, even though it works perfectly for me on both 1 and 2.
SteveIs4Cacti
Posts: 13
Joined: Fri Jun 09, 2006 10:09 am
Location: South Carolina

Post by SteveIs4Cacti »

I am getting the the status as 0 on all of my services. I have made the recomended changes in mysql and in the win_services file. I have cleared the poller cache as well. Server is W2K3 with Cacti 0.8.6h.
SteveIs4Cacti
Posts: 13
Joined: Fri Jun 09, 2006 10:09 am
Location: South Carolina

It is working..

Post by SteveIs4Cacti »

Please disregard my last post. It is working now.
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: It is working..

Post by cigamit »

SteveIs4Cacti wrote:Please disregard my last post. It is working now.
Any particular thing you did to get it working? As that info may help someone else out if they run into the same issue.
User avatar
Diggit2001
Cacti User
Posts: 195
Joined: Tue May 03, 2005 4:29 pm
Location: MD, US

Post by Diggit2001 »

I'm having the same problem. When I go to create graphs for a particular device, I can see all the services. I select the ones I wish to monitor and create the graphs. Even though I know they are running, the graph stays at 0. I've seen several people with this problem but no solutions. Can anyone help?

Thanks
mories
Posts: 8
Joined: Fri Dec 30, 2005 1:45 pm

Post by mories »

I have had the same problem, got it working now, and even I don't known exactly how I figured it out. ;-) See a few messages above this one. http://forums.cacti.net/viewtopic.php?p=67694#67694

I had to change the size in two substr function calls

Hope this helps.
User avatar
Diggit2001
Cacti User
Posts: 195
Joined: Tue May 03, 2005 4:29 pm
Location: MD, US

Post by Diggit2001 »

Hmm. I've tried everything mentioned here and still no luck.

Time to get the sledge hammer.......
User avatar
Diggit2001
Cacti User
Posts: 195
Joined: Tue May 03, 2005 4:29 pm
Location: MD, US

Post by Diggit2001 »

The mere mention of the dreaded sledgehammer and the servers cower in fear.

I went in to each device and hit the verbose query for the Win Services data query, cleared the cache and all is working now.

Must have patience, I suppose. :D
simonuk1
Posts: 23
Joined: Mon Aug 15, 2005 2:39 pm

Post by simonuk1 »

I have the services monitoring working for most services, however I have just put some more services in to monitor and they are not working.
I had a look at the snmp walk for the services index and found that the services that I am using have massive OID numbers.

As you can see from the info bellow the OID seems ok from the SNMP walk and in the poller_item table, but the cacti log shows the OID with about 44 characters truncated of the end.

I have done the arg1 to text database fix and the win_services oid fix, mentioned earlier in the thread, which did mean that most of the services monitoring ok.

Is there a limit on the length of an OID?


Backup Exec Remote Agent for Windows Servers


From Cacti log
1 4 get servstate 52.87.105.110.100.111.119.115.32.77.97.110.97.103.101.109.101.110.116.32.73.110.115.116.114.117.109.101.110.116.97.116.105.111.110.32.68.114.105.118.101.114., output: 0


From SNMPWALK
.1.3.6.1.4.1.77.1.2.3.1.1.52.87.105.110.100.111.119.115.32.77.97.110.97.103.101.109.101.110.116.32.73.110.115.116.114.117.109.101.110.116.97.116.105.111.110.32.68.114.105.118.101.114.32.69.120.116.101.110.115.105.111.110.115

Database (poller_item) (ARG1)
/var/www/html/scripts/win_services.php win_services ###### #### 1 4 get servstate 52.87.105.110.100.111.119.115.32.77.97.110.97.103.101.109.101.110.116.32.73.110.115.116.114.117.109.101.110.116.97.116.105.111.110.32.68.114.105.118.101.114.32.69.120.116.101.110.115.105.111.110.115


Any help on this would be appreciated.

Si

Running on CactiEZ(latest version)
simonuk1
Posts: 23
Joined: Mon Aug 15, 2005 2:39 pm

Post by simonuk1 »

Anybody any ideas what I can try to sort this ?

Pleassssss ;)
nocrack
Posts: 3
Joined: Thu Jun 22, 2006 8:54 am

Post by nocrack »

Hello !!

Thanks, that's a good template !!!
but i don't know what can i write in input index_type, index_value, output_type when i create a graph
however, php script seem to works good (i test it on comand line)

thanks to help me !
nocrack
Posts: 3
Joined: Thu Jun 22, 2006 8:54 am

Post by nocrack »

It's OK !
I'va find wher is the problem.
I've include template in Associated Data Queries and it's ok.
simonuk1
Posts: 23
Joined: Mon Aug 15, 2005 2:39 pm

Post by simonuk1 »

simonuk1 wrote:I have the services monitoring working for most services, however I have just put some more services in to monitor and they are not working.
I had a look at the snmp walk for the services index and found that the services that I am using have massive OID numbers.

As you can see from the info bellow the OID seems ok from the SNMP walk and in the poller_item table, but the cacti log shows the OID with about 44 characters truncated of the end.

I have done the arg1 to text database fix and the win_services oid fix, mentioned earlier in the thread, which did mean that most of the services monitoring ok.

Is there a limit on the length of an OID?


Backup Exec Remote Agent for Windows Servers


From Cacti log
1 4 get servstate 52.87.105.110.100.111.119.115.32.77.97.110.97.103.101.109.101.110.116.32.73.110.115.116.114.117.109.101.110.116.97.116.105.111.110.32.68.114.105.118.101.114., output: 0


From SNMPWALK
.1.3.6.1.4.1.77.1.2.3.1.1.52.87.105.110.100.111.119.115.32.77.97.110.97.103.101.109.101.110.116.32.73.110.115.116.114.117.109.101.110.116.97.116.105.111.110.32.68.114.105.118.101.114.32.69.120.116.101.110.115.105.111.110.115

Database (poller_item) (ARG1)
/var/www/html/scripts/win_services.php win_services ###### #### 1 4 get servstate 52.87.105.110.100.111.119.115.32.77.97.110.97.103.101.109.101.110.116.32.73.110.115.116.114.117.109.101.110.116.97.116.105.111.110.32.68.114.105.118.101.114.32.69.120.116.101.110.115.105.111.110.115


Any help on this would be appreciated.

Si

Running on CactiEZ(latest version)

Well I havent had any feedback on this and after investigation the only thing i couldnt rule out was cactid, I have switch back to CMD.PHP and now everything is working.

So it would appear to be a problem with cactid.

Has long OID ever been reported as a bug in cactid ?

Si
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

time

Post by gilles »

hello cigamit,

i am trying your template since some weeks and just realize that when a service stop or start, snmp oids are not updated before 2 long minutes.

is it like that on your systems or i have bad luck ?

i have tested on win xp sp2, win2003 sp1, win 2000 sp4

thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests