Ah, actually, just looking at the regex, it's looking for d+ so a numerical value. Is your online user count showing as 1,000 (with the comma)?
I'll see if I can adjust the regex and remove the comma from the value.
Have you had a chance to look at this yet?
Probably this section here.Cheers
No rush, just I wouldn't know where to start![]()
if ($response->content =~ /Online\snow\:\s\d+\s\(members\:\s(\d+)\,\sguests\:\s(\d+)\)/im)
{
print "members.value $1\n";
print "guests.value $2\n";
} else {
print "members.value U\n";
print "guests.value U\n";
}
# part of the output we want to catch : Online now: 79 (members: 18, guests: 61) --> 18 - 61
if ($response->content =~ /Online\snow\:\s\d+\s\(members\:\s(\d+)\,\sguests\:\s(\d+)\)/im)
{
print "members.value $1\n";
print "guests.value $2\n";
} else {
print "members.value U\n";
print "guests.value U\n";
}
# part of the output we want to catch : Online now: 79 (members: 18, guests: 61) --> 18 - 61
if ($response->content =~ /Online\snow\:\s(.*)\s\(members\:\s(.*),\sguests\:\s(.*)\)/im)
{
print "members.value $2\n";
print "guests.value $3\n";
} else {
print "members.value U\n";
print "guests.value U\n";
}
[mworthington@artemis ~]$ ./xenforo_users2
members.value 83
guests.value 1,228
Ready to roll with XF 1.2
Code:./xenforo_users2 members.value 50 guests.value 417 robots.value 31
Unluckily, I don't think it's going to work:This is a quick and dirty fix, as rather than looking for a number, we are just going to match anything in those specific places. I've tested it against Digital Points site, and it's pulling back results, but I don't currently have Munin installed myself to see if it will still graph correctly.
We use essential cookies to make this site work, and optional cookies to enhance your experience.