akia
Well-known member
I'm trying to adapt the vbulletin munin plugin to track online members/guests to work with xenforo. See: https://github.com/munin-monitoring/contrib/blob/master/plugins/forum/vbulletin_users which isn't really a wise choice because I've not got a clue what I'm doing, but I suppose I'll never learn these things unless I start to try to do it myself.
Now looking at it I won't need to change much apart from the regex that's extracts the data which is currently:
I can see from the source on my home page I'd need to extract the 9 and 50 numbers from below
Can anyone help with the regex to do that?
The second thing I'm trying to do with munin is then track how many posts and threads and members I've got on my site as it grows. (I know xenforo has this build in, but I want to be able to see it as part of the munin charts with the other information without having to log into xenforo.)
I plan on having 3 different chats to track each thing so can someone help with the regex to extract each of the above?
Thirdly is there any way to simply output the above information so that I don't have to have it load the homepage every time. I'm thinking maybe a Page thats not displayed on the node tree with just that into on.
Now looking at it I won't need to change much apart from the regex that's extracts the data which is currently:
Code:
/<strong>(\d+)\smembers[^\d]+(\d+)\sguests<\/strong>/im)
I can see from the source on my home page I'd need to extract the 9 and 50 numbers from below
Code:
Online now: 59 (members: 9, guests: 50)
Can anyone help with the regex to do that?
The second thing I'm trying to do with munin is then track how many posts and threads and members I've got on my site as it grows. (I know xenforo has this build in, but I want to be able to see it as part of the munin charts with the other information without having to log into xenforo.)
Code:
<dl class="discussionCount"><dt>Discussions:</dt>
<dd>7,050</dd></dl>
<dl class="messageCount"><dt>Messages:</dt>
<dd>125,986</dd></dl>
<dl class="memberCount"><dt>Members:</dt>
<dd>1,048</dd></dl>
Thirdly is there any way to simply output the above information so that I don't have to have it load the homepage every time. I'm thinking maybe a Page thats not displayed on the node tree with just that into on.