Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2010-11-11 23:32:17

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,832
Website

Re: smd_prognostics: monitor your Txp installation for suspicious activity

hcgtv wrote:

I have Check files on public side clicks: set to yes and things are working fine so far.

OK, good to know, thanks. I think the problems on my site may be down to a few factors:

1) some pretty intense .htaccess redirects
2) checking a lot of files (around 700 of them). So perhaps the script is hitting some PHP resource limit or something on the public side due to the amount of other stuff going on (guessing the load is lower on the admin side)

I’m checking things as I go. I’ve also found a wee bug if you happen to try to monitor (large) binary files; the sanitization I do to cater for Windows/UNIX line endings and SVN differences is triggering the white screen of death when you try and Save the Files list. Fix in progress: the workaround is to only include text files for now, or fairly small binary files (not 10Mb video files like I tried!)

I’ve noticed on the Setup page, that when I make a change, and click save, that it returns the screen with the old values

Shouldn’t happen on TXP 4.3.0 which is the plugin’s minimum requirement. That behaviour you’re seeing is a 4.2.0 issue. It is actually saving the values, it just displays them incorrectly the first time round after a Save. Verify this by just clicking the Prognostics tab heading again after saving.

However, if it’s happening under 4.3.0 then please let me know which PHP/MySQL version you’re running, etc and I’ll see if it’s something I can fix.

Regarding the e-mail address to send the frognostics to, it’s in the plugin help towards the end. If you don’t mind the file paths and things divulged then by all means add that address. If not, sanitize the e-mails you get and forward them whenever you get a chance. Thanks for helping out. As you say, will be interesting to see what gets through.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#12 2010-11-11 23:42:36

hcgtv
Plugin Author
From: Miami, Florida
Registered: 2005-11-29
Posts: 2,721
Website

Re: smd_prognostics: monitor your Txp installation for suspicious activity

Bloke wrote:

Shouldn’t happen on TXP 4.3.0 which is the plugin’s minimum requirement. That behaviour you’re seeing is a 4.2.0 issue. It is actually saving the values, it just displays them incorrectly the first time round after a Save.

Yes, the site is running 4.2.0, haven’t had the chance to upgrade.

Regarding the e-mail address to send the frognostics to, it’s in the plugin help towards the end.

Added.

Offline

#13 2010-11-12 00:26:37

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 975
Website

Re: smd_prognostics: monitor your Txp installation for suspicious activity

Stef

I installed it on one of my mulit-sites. When I go to the file panel, it appears I now have access to the files in all of the sites that are in the sites folder. Is this intended behavior?

Thanks

Mike

Offline

#14 2010-11-12 00:55:27

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 975
Website

Re: smd_prognostics: monitor your Txp installation for suspicious activity

Another issue that probably relates to being multi-site – the link in the alarm emailed to me doesn’t point back to the admin panel. (admin.domain.com)

Instead it was:

a href=“http://www.domain.com//index.php?event=smd_prognostics&step=smd_prognostics_ack&smd_prognostics_suppress=1”>Acknowledge alarms

Last edited by maverick (2010-11-12 00:55:47)

Offline

#15 2010-11-12 00:58:28

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,832
Website

Re: smd_prognostics: monitor your Txp installation for suspicious activity

maverick wrote:

When I go to the file panel, it appears I now have access to the files in all of the sites that are in the sites folder. Is this intended behavior?

Short answer: I don’t know as I’ve never tried multi-site :-)

Long answer: it just does a recursive listing of every file below the given path(s) in File locations, so check the path there. If there’s no trailing slash it could be that it’s picking up everything at that level and below *shrug*. If it’s causing problems in multi-site you can try listing each site (comma-separated) in the File locations field. e.g. /path/to/site1/, /path/to/site2/, .... That might cut down your files list a bit. Or put the plugin on each site and monitor them all separately (which might be preferred in terms of speed), pooling the checksums files in a central dir just outside the docroot of your core install. Use the Unique prefix option for this so your checksums files don’t clash.

I’m working on speeding the plugin up a bit. Each time the timeout period has been met and the plugin determines its time to check the files, it reads the entire contents of each file you are monitoring, calculates its checksum and compares that against the stored checksum. If you have a lot of files or some large files in your monitor list, it adds to the processing time and slows your site down (admin-side and/or public side depending on the settings). For this reason, only monitor what you really need to monitor and ignore stuff you can live without or that you don’t care about too much.

I’ve not quite got my head round how this plugin should operate in a multi-site environment. Multiple databases, multiple content paths (files, images, etc) but only one set of core files, right? Do you still log into each site separately? Guess you must do. So do you install this plugin on each site separately? I guess you should do. From my (possibly misguided) five-minute think over this, I reckon the best way to run it might be one smd_prognostics per site to cover that site’s files (images, files, whatever) and then nominate one of the sites to also monitor the core files. No need to monitor the core files from all of them.

Any of that make sense? If you have any thoughts on how the plugin coiuld be improved in multi-site environments then please let me know. I’ll see what I can do to simplify things.

EDIT: yah nuts. Yeah it uses hu to return the path to the sitefor acknowledging alarms which I believe is wrong in multi-site. Hmmm. Needs some thought.

Last edited by Bloke (2010-11-12 01:00:01)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#16 2010-11-12 01:47:05

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 975
Website

Re: smd_prognostics: monitor your Txp installation for suspicious activity

I’m away from the computer for the rest of the night but will try some of path suggestions when I get back.

Some things are duplicated. Some are not – like admin themes – but with the sym links it looks like the files of each them show up repeatedly. With the various sym links the files showing in the panel add up fast. As in several thousand.

That’s a lot to wade through to find the ones to monitor.

My other thought was more along privacy/security. It’s not an issue as long all the domains are for sites I run. But if I were to use it on an install powering multiple sites for various other people and they have publisher privileges it wouldn’t seem very private.

The solution may be individual installs.

Offline

#17 2010-11-12 02:07:30

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 975
Website

Re: smd_prognostics: monitor your Txp installation for suspicious activity

If it would help your development I can give you a login to this multisite install. I use it as a sandbox and for a couple of personal sites – so no issues there.

Offline

#18 2010-11-12 18:53:17

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,832
Website

Re: smd_prognostics: monitor your Txp installation for suspicious activity

Thanks Mike, yes it might.

In the meantime, v0.12 is available. It’s highly recommended to upgrade to it and visit the Setup tab then Save you settings as there’s a new pref available. Features in this release:

  • Added file quantity check so you can now process your list of files in bite size chunks, meaning you can run it more often with fewer files each time
  • Fixed white screen of death on Files Save (binary files are now left unprocessed)
  • Improved performance

I’ve got it live on my site and it seems to be working now with public side clicks enabled. Hopefully that’s the end of the white screen of death on my site! Let me know how you get on.

Last edited by Bloke (2010-11-12 18:54:21)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#19 2010-11-12 20:59:07

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: smd_prognostics: monitor your Txp installation for suspicious activity

Bloke wrote:

2) checking a lot of files (around 700 of them). So perhaps the script is hitting some PHP resource limit or something on the public side due to the amount of other stuff going on (guessing the load is lower on the admin side)

Is that all Stef? When I first installed the plugin I was looking at around 3500 files! It didn’t seem to want to know when I tried to select all of them so maybe there are limits that it has to work within.

Anyway I figure that I shall have to be very specific about the folders and individual files I specify for the top level directory (thebombsite) and have separate plugins in each Txp install in sub-directories. I mention that in case other users have several sub-sites.

But other than that I haven’t encountered any problems. ;)

Oh and it looks great in Vitraux, including the help docs. :)

Last edited by thebombsite (2010-11-13 01:33:50)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#20 2010-11-13 01:32:27

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: smd_prognostics: monitor your Txp installation for suspicious activity

From the Help file:-

The message delivered to you contains a link to the Acknowledgement page (which can also be reached by clicking the Alarms button from the Prognostics tab).

I did an SVN update and it sent me an email about the files that I had changed. OK so far. When I clicked on the contained link it simply took me to my site and not to admin. There was no “/textpattern/index.php” included in the link. I’m thinking that’s wrong.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB