russellvt / pnp4nagios

PNP is an addon to Nagios/Icinga which analyzes performance data provided by plugins and stores them automatically into RRD-databases.
https://docs.pnp4nagios.org
GNU General Public License v2.0
5 stars 3 forks source link

php8 modernizing #6

Open celane opened 1 year ago

celane commented 1 year ago

I've been using pnp4nagios for a long time, but recent changes to php has messed it up... SO, this fork seemed to be the most up-to-date, and put in a bit of effort to get things working, at least for me. I fully expect to get "yur doon it rong" comments.

Main features: works with php8, npcd running as a systemd service, rrdtool graphing needed a "writable fontconfig cache", rpm packaging.

Here'e the fork, with changes and a couple of rpm packages: https://github.com/celane/pnp4nagios

(the rpm makes use of a fun feature of 'build from git clone', since I prefer rpms for handling package install/upgrade, but git for actually keeping the code, thought it was worth sharing)

russellvt commented 1 year ago

Thank you for the contribution... can you please craft a fork/branch from here, so we can make this a bit more "seamless" for everyone?

russellvt commented 1 year ago

FWIW, I do not have what I'd consider an adequate PHP8 development environment right now... so, I'm happy to take contributions for this one.

Note: We should still pass PHP5.6+ type tests ... mostly because I know many places still have ridiculously old environments for their Nagios/Icinga servers, despite as much as I hate that problem.

celane commented 1 year ago

had some minor-yet-annoying bugs to stomp on, but will soon be ready to see about a merge, but I would like to address the 'backwards compatibility' issue first.

I'll see if I can try out running on php 5.6, but it'll be a downgrade. One of the systems I'm running pnp4nagios on is php8, the other is php7.2.

celane commented 1 year ago

Okay, I spun up a VM with Fedora 22 that uses PHP 5.6, installed Nagios and pnp4nagios...and it works. At least, no bugs found while doing graphs, pdfs, etc.

So I have the same pnp4nagios code running on php8.0 (Fedora 35), php 7.2 (Alma 8.6) and php5.6 (Fedora22).

It's in a fork from this git project, probably should see about a merge.

Put in a "pull" request, so can merge changes now.

miken32 commented 1 year ago

Supporting PHP 5.6 seems like a bit of a lost cause. If they want to run legacy systems, let them use legacy code.

foliver-wi commented 1 year ago

Have Celane's code (0.6.26-12) running on RH el8 using PHP 8.0.20. No major problems so far. Have a time frame when PHP 8.0 support will be merged in?