Use of Cactid instead of cmd poller.

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
Slacuser
Posts: 8
Joined: Mon Jul 18, 2005 10:48 am
Location: Montreal

Use of Cactid instead of cmd poller.

Post by Slacuser »

Excuse my ignorance but I am a bit confused about using Cactid instead of cmp for polling my devices.
The Cactid documentation mentions the need to compile Cactid with Cygwin before usage, but I can see that the binaries for Windows are already available for download in EXE format. Do I still need to run the compile command on the Cactid.exe file?
:-?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

You don't need to compile it then, but you will need cygwin installed and working for it to work.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Slacuser
Posts: 8
Joined: Mon Jul 18, 2005 10:48 am
Location: Montreal

Use of Cactid instead of cmd poller.

Post by Slacuser »

Thanks for the info.

Now I have installed CYGWIN full installation and I have modified Cacti's settings by entering the cactid path and specified cactid as the poller instead of cmd. There are no more graphing done.
I checked the cacti log file and it shows:
08/29/2005 11:25:59 AM - POLLER: Poller[0] Maximum runtime of 296 seconds exceeded. Exiting.
08/29/2005 11:15:59 AM - POLLER: Poller[0] Maximum runtime of 296 seconds exceeded. Exiting.
08/29/2005 11:06:00 AM - POLLER: Poller[0] Maximum runtime of 296 seconds exceeded. Exiting.

After 3 cycles, I decided to revert to cmd.

I would like to use CACTID to poll my devices as I am adding 250+ routers and switches with 1500+ interfaces to monitor.

Did I forget something in installing CYGWIN?
What could have gone wrong?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Well you need to find out why the polling is timing out.

Turn the polling level in cacti to debug (Settings | Polling level) for one cycle and paste the output of the log file (./cacti/cacti.log). If it contains WEBLOG entries, then don't bother posting since they just clutter up the log. Turn off WEBEVENTS logging and try again.

What versions of everything are you running?
Slacuser
Posts: 8
Joined: Mon Jul 18, 2005 10:48 am
Location: Montreal

Use of Cactid instead of cmd poller.

Post by Slacuser »

Thanks for your help, it is very appreciated.
1) I turned cactid back on (both poller type and path)
2) I let it run for 2 cycles and here are the results:
08/29/2005 01:01:04 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 100 107]
08/29/2005 01:01:04 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 91 99]
08/29/2005 01:01:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 72 90]
08/29/2005 01:01:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 61 71]
08/29/2005 01:01:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 52 60]
08/29/2005 01:01:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 43 51]
08/29/2005 01:01:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 34 42]
08/29/2005 01:01:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 22 33]
08/29/2005 01:01:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 13 21]
08/29/2005 01:01:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 0 12]
08/29/2005 01:00:59 PM - POLLER: Poller[0] Maximum runtime of 296 seconds exceeded. Exiting.
08/29/2005 12:56:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 100 107]
08/29/2005 12:56:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 91 99]
08/29/2005 12:56:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 72 90]
08/29/2005 12:56:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 61 71]
08/29/2005 12:56:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 52 60]
08/29/2005 12:56:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 43 51]
08/29/2005 12:56:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 34 42]
08/29/2005 12:56:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 22 33]
08/29/2005 12:56:02 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 13 21]
08/29/2005 12:56:02 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid, ARGS: 0 12]
08/29/2005 12:51:00 PM - POLLER: Poller[0] Maximum runtime of 296 seconds exceeded. Exiting.

3) Here is the list of products revisions:
Apache 2.0.54
Cacti 0.8.6f
Cactid 0.8.6e
MySQL 4.1.12a
Net-SNMP 5.2.11
PHP 5.0.4
RRDTools 1.0.48 (from Cacti's site)
Cygwin 1.5.18
Slacuser
Posts: 8
Joined: Mon Jul 18, 2005 10:48 am
Location: Montreal

Use of Cactid instead of cmd poller.

Post by Slacuser »

From the log file I noticed that Cacti wanted to launch a remote process for which only the path c:\cactid was specified.
So I corrected the Alternate Poller Path entry with: c:\cactid\cactid.exe
And here is the log file content:
08/29/2005 01:31:04 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid\cactid.exe, ARGS: 100 107]
08/29/2005 01:31:04 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid\cactid.exe, ARGS: 91 99]
08/29/2005 01:31:04 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid\cactid.exe, ARGS: 72 90]
08/29/2005 01:31:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid\cactid.exe, ARGS: 61 71]
08/29/2005 01:31:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid\cactid.exe, ARGS: 52 60]
08/29/2005 01:31:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid\cactid.exe, ARGS: 43 51]
08/29/2005 01:31:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid\cactid.exe, ARGS: 34 42]
08/29/2005 01:31:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid\cactid.exe, ARGS: 22 33]
08/29/2005 01:31:03 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid\cactid.exe, ARGS: 13 21]
08/29/2005 01:31:02 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid\cactid.exe, ARGS: 0 12]
08/29/2005 01:30:59 PM - POLLER: Poller[0] Maximum runtime of 296 seconds exceeded. Exiting.

The result is still no graphs are displayed.
Just FYI.
Thanks again for your assistance.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Did you set the security on cmd.exe, like the installation guide said?
Does cmd.php work for polling devices?
Slacuser
Posts: 8
Joined: Mon Jul 18, 2005 10:48 am
Location: Montreal

Use of Cactid instead of cmd poller.

Post by Slacuser »

I haven't set anything special for cmd.exe
The machine's Administrator's account runs all Cacti's process.

The cmd.php polls devices without problems.
I want to use Cactid as I am adding more and more devices to it, and I want to monitor between 2000 and 2500 interfaces.
User avatar
ichoudhury
Posts: 46
Joined: Tue May 31, 2005 8:18 am

Post by ichoudhury »

You can try this and see if you have any luck...

1) Download the RRDTool Binary from cacti's download site
2) Download the cactid.exe
3) Just put the cactid.exe and RRDTool.exe to the c:\cygwin\bin directory (including cactid.conf)
4)Set logging to DEBUG and run from c:\cacti directory ... php poller.php

What is your output?
There are those who think fast, and there are others who sleep on a decision. I belong to the third group.
Slacuser
Posts: 8
Joined: Mon Jul 18, 2005 10:48 am
Location: Montreal

Use of Cactid instead of cmd poller.

Post by Slacuser »

I already had RRDTools from Cacti's site (version 1.0.48)
Cactid version is 0.8.6e.

I copied RRDTool.exe, Cactid.exe, Cactid.conf and cygwin1.dll to c:\cygwin\bin.
So I overwritten cygwin1.dll from CYGWIN with the one from Cactid.
I also changed the path settings to c:\cygwin\bin\rrdtools.exe and c:\cygwin\bin\cactid.exe for RRDTools and Alternate Poller path respectively.
Here the log:

08/31/2005 10:26:04 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 100 107]
08/31/2005 10:26:04 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 91 99]
08/31/2005 10:26:03 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 72 90]
08/31/2005 10:26:03 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 61 71]
08/31/2005 10:26:03 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 52 60]
08/31/2005 10:26:03 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 43 51]
08/31/2005 10:26:03 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 34 42]
08/31/2005 10:26:03 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 22 33]
08/31/2005 10:26:02 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 13 21]
08/31/2005 10:26:02 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 0 12]
08/31/2005 10:25:59 AM - POLLER: Poller[0] Maximum runtime of 296 seconds exceeded. Exiting.
08/31/2005 10:21:04 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 100 107]
08/31/2005 10:21:04 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 91 99]
08/31/2005 10:21:04 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 72 90]
08/31/2005 10:21:03 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 61 71]
08/31/2005 10:21:03 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 52 60]
08/31/2005 10:21:03 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 43 51]
08/31/2005 10:21:03 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 34 42]
08/31/2005 10:21:03 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 22 33]
08/31/2005 10:21:03 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 13 21]
08/31/2005 10:21:02 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cygwin\bin\cactid.exe, ARGS: 0 12]
08/31/2005 10:20:59 AM - POLLER: Poller[0] Maximum runtime of 296 seconds exceeded. Exiting.

There are still no graphs.

Excuse my ignorance but once CYGWIN is installed is there anything else that needs to be done? I mean, do you need to run something in CYGWIN as a service in Windows? Do I need to run something in permanence like a Cygwin window/process?
I am asking because I do not understand the relation or function of CYGWIN/Cactid and Cacti itself?

Thanks for your patience.
Slacuser.
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I guess it's my turn.

1) Disable your scheduled task
2) Turn Logging in Cacti to DEBUG
3) Open a command prompt window
4) Change directories to the Cactid directory
5) Run the following command "cactid.exe"
6) Paste your results.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Slacuser
Posts: 8
Joined: Mon Jul 18, 2005 10:48 am
Location: Montreal

Use of Cactid instead of cmd poller.

Post by Slacuser »

I think that we are getting there. It is encouraging.
When I run Cactid in a command prompt, I get the following result:

CACTID: Using cactid config file [cactid.conf]
CACTID: MYSQL: Connection Failed: #HY000Host 'DP04653' is not allowed to connect to this MySQL server

DP04653 is the computer's NetBIOS name, but the cactid.conf file is as follow:
DB_Host 192.168.101.201
DB_Database cacti
DB_User root
DB_Pass password

This result from cactid.exe running from CMD prompt is somewhat strange to me. It looks like this is a problem with rights to MySQL database. Is there a way I can allow "DP04653" access to MySQL?

Regards, Slacuser
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You are correct. A good source of advice is the mysql.com web site.

Larry
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
ichoudhury
Posts: 46
Joined: Tue May 31, 2005 8:18 am

Post by ichoudhury »

One thing I did in my case is used the cygwin1.dll that came with cygwin installation instead of what came with cactid or rrdtool binary. In fact, my idea of moving them to all cygwin\bin directory was to avoid too many cygwin1.dll in the system. At any rate, also try this...

Update cactid.conf with the following info (but first create a Windows user called cactiuser with password (whatever you want to create)

DB_Host 192.168.101.201
DB_Database cacti
DB_User cactiuser
DB_Pass password

c:\mysql --user=root --password mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@192.168.101.201 IDENTIFIED BY 'somepassword';
mysql> flush privileges;


mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
mysql> flush privileges;

then run

c:\php\php.exe c:\cacti\poller.php
There are those who think fast, and there are others who sleep on a decision. I belong to the third group.
Slacuser
Posts: 8
Joined: Mon Jul 18, 2005 10:48 am
Location: Montreal

Use of Cactid instead of cmd poller.

Post by Slacuser »

You guys are ABSOLUTELY FANTASTIC!!!
All is working fine now and CACTID runs so darn fast when you have so many devices to monitor.

I am putting myself a note in the installation procedure to make sure that whatever I put in cactid.conf file's DB_Host statement (like IP address), I should ensure that I grant rights to "cactiuser@IP_address" in the MySQL installation steps.

Thanks to all of you guys. 2 thumbs up!

Cheers! Slacuser.
:D
Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests