Monitor Windows Service stats from Linux

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

Moderators: Moderators, Developers

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

#16 Post by niccos » Tue Jun 06, 2006 9:44 am

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 17325 times
graph_choice.jpg
graph_choice.jpg (14.39 KiB) Viewed 17326 times

cigamit
Developer
Posts: 2780
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

#17 Post by cigamit » Tue Jun 06, 2006 11:50 pm

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

#18 Post by SteveIs4Cacti » Fri Jun 09, 2006 10:15 am

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..

#19 Post by SteveIs4Cacti » Wed Jun 14, 2006 1:27 pm

Please disregard my last post. It is working now.

cigamit
Developer
Posts: 2780
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: It is working..

#20 Post by cigamit » Wed Jun 14, 2006 6:26 pm

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: 163
Joined: Tue May 03, 2005 4:29 pm
Location: MD, US
Contact:

#21 Post by Diggit2001 » Fri Jun 16, 2006 11:01 am

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

#22 Post by mories » Fri Jun 16, 2006 12:57 pm

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: 163
Joined: Tue May 03, 2005 4:29 pm
Location: MD, US
Contact:

#23 Post by Diggit2001 » Fri Jun 16, 2006 3:17 pm

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

Time to get the sledge hammer.......

User avatar
Diggit2001
Cacti User
Posts: 163
Joined: Tue May 03, 2005 4:29 pm
Location: MD, US
Contact:

#24 Post by Diggit2001 » Fri Jun 16, 2006 3:49 pm

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

#25 Post by simonuk1 » Tue Jun 20, 2006 4:12 am

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

#26 Post by simonuk1 » Wed Jun 21, 2006 8:52 am

Anybody any ideas what I can try to sort this ?

Pleassssss ;)

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

#27 Post by nocrack » Thu Jun 22, 2006 8:59 am

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

#28 Post by nocrack » Thu Jun 22, 2006 11:11 am

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

#29 Post by simonuk1 » Sun Jun 25, 2006 10:00 am

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

#30 Post by gilles » Tue Jul 18, 2006 9:57 pm

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