strange script query question

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

Moderators: Developers, Moderators

Post Reply
mrossFTEK
Posts: 22
Joined: Wed Jul 26, 2023 8:13 am

strange script query question

Post by mrossFTEK »

ok my cacti is on a windows 2019 box
i downloaded a few .pl scripts from the forum, that i think we written for linux..
if i run the scripts manually in a cmd box, and i do
perl.exe C:\inetpub\wwwroot\cacti\scripts\windows_2k7_exchangequeues.pl "Exchserver"
it works perfectly and shows me results
HOWEVER in my cacti log, using this script against a server, i get this
C:/inetpub/wwwroot/cacti/scripts/windows_2k7_exchangequeues.pl "Exchserver", , output: U
i KNOW the issue is the slashes.. / vs \ obviously windows likes the \ and linux likes the /
would there be a setting in cacti .. via in the gui or in the individual files where we can change it from using / and use \ on a particular script or basis?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: strange script query question

Post by TheWitness »

The back vs. forward slash is not the issue. PHP handles it properly. It's likely what is passed to the script or rather what is not passed to the script, or a permission issue that prevents the poller from running the script properly.
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
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: strange script query question

Post by TheWitness »

BTW, you have to provide the full path to perl as Spine does not initialize your environment by design. That's more than likely the issue here. Spine does not know where perl.exe is.
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?
mrossFTEK
Posts: 22
Joined: Wed Jul 26, 2023 8:13 am

Re: strange script query question

Post by mrossFTEK »

unfortunately, i havent been able to get SPINE to work on my setup.. ive used it in the past, but on this install, only the cmd.php poller seems to work.. i havent figured out why yet.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: strange script query question

Post by TheWitness »

The installer for 1.2.25 installs it.
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?
mrossFTEK
Posts: 22
Joined: Wed Jul 26, 2023 8:13 am

Re: strange script query question

Post by mrossFTEK »

i havent seen a post that version is out of beta.
plus, i believe id have to setup maria and few other things that are not part of the "original" all in one windows installer.
is there a guide to going from the 'classic' cacti setup and requirements to this new one? the classic version was pretty easy to upgrade version to version, but with a new DB engine , and any other requirements it seems a bit more complicated.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: strange script query question

Post by TheWitness »

From old Cacti to new. Well, it's pretty simple:

1) Make sure your are on PHP5.4+ and have all the required modules installed (I prefer PHP8.2 though you have to be careful here. Maybe after the upgrade is done)
2) Make sure your MySQL or MariaDB versions are pretty recent, like 5.6+ 10.3+
3) Verify your MySQL settings are good per the README.md file in the Develop branch of Cacti. Those settings equally apply for 1.2.x versions. Note, if you switch settings, you will have to restart MariaDB/MySQL. Not a big deal.
4) Copy the Cacti source code into the Cacti directory from the 1.2.25 release
5) Point your browser to https://mysite.com/cacti/index.php and proceed with the upgrade.
6) QED.

It's not that complicated.
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?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest