Monitoring community

One of the promises of Zabbix is an ability to monitor pretty much anything. That is possible using various extending capabilities on the Zabbix server, binary agent and elsewhere. Maybe we can monitor some aspects of Zabbix community using Zabbix itself?

There have been a few unorthodox things being monitored that we have looked at already – monitoring Zabbix documentation and monitoring weather forecast. But what could we monitor to determine the size of Zabbix community?

The archaeological dig

One of the standard communication methods for open source projects is IRC. For Zabbix users, place to communicate is channel #zabbix on IRC network Freenode. While precise records of the beginning of this channel are not available, some preserved logfiles show 13 users at June 1st, 2006. The same set of logfiles holds information about user count till today, mostly from channel join messages and manually invoked user list command. While more precise user count fluctuations could be deduced coupling user join/part records with this information, that’s probably not that crucial to have.

Analysing the records

Of course, to get some nice result we will try to use Zabbix itself. This is a quite non-common monitoring need, thus Zabbix does not have a built-in item to gather such information – yet. After a few kludgy scripts, concatenated files and format conversions (while all the logs luckily were from the same IRC client – Irssi – naming scheme and formatting had changed several times over this 5-year span) a list of timestamps and corresponding amount of users was obtained. Original logfiles had entry times in local time. To keep things simple, they were converted to Unix timestamps ignoring summer time offset. At the scale we will be looking at this data that shouldn’t cause any issues (and messing with the clock is silly anyway).

Once we have a list like that, we should somehow get that in Zabbix – and proficient Zabbix users probably have guessed by now that we will use a very nice commandline utility called zabbix_sender to do that. This utility allows to send any values to a specific Zabbix item type – Zabbix trapper items. Before sending the values, care was taken to set trend retention period (Keep trends option in item properties) to 10 years, because we would like to gather and keep this information for a long period of time. If that was not done, the internal Zabbix process that is responsible for old information cleanup, housekeeper, would come over and delete old values soon after we had imported them.

Getting the result

With the values imported it was time to look at a nice long term graph. But… by default Zabbix graphs are limited to 2 years. Our timespan was almost 5 years (to be more specific, 5 years minus one day). What to do? Luckily, this limit can easily be changed. As documented in the Zabbix manual, we had to change ZBX_MAX_PERIOD in the include/defines.inc.php file. After setting this to some larger value, a long term graph was available.

The great thing is that user count has increased over all this time. Other interesting things include pretty slow uptake during the first few years, with steady increase kicking in around… yeah, what year is that? Apparently, Zabbix graphs could be slightly improved when looking at longer period of data, otherwise no year information is shown. Digging a bit deeper and looking at data we can see the increase starting around first half of 2009. While x axis labels could be improved, at least the graph was generated pretty much instantly.

We can also see some periods of missing data (indicated by unlikely straight lines), but they don’t seem to hide significant trending information. Examining the legend we can see that maximum amount of users in the channel (at least as caught by the logfiles) has been 126 – not too shabby. Minimum has been only 7, though… and that seems to be caused by one of the significant drops much later in the channel history. That can probably be attributed to a netsplit, or maybe to some real life event (like celebrations in December).

Another interesting bit about the generated graph itself is it’s title – it shows “4y 12m”. While that might seem somewhat weird, we may try to recall the data range we have – and that’s 5 years one day short.

But preparing this long term report was motivating to keep such data gathered in the future as well, and maybe even with better granularity. Thus amount of users in the channel has been recorded for the last week hourly. Looking at the graph for approximately one week, we can see expected daily fluctuations (“working time” highlighting is based on GMT+3).

User count increases around 09:00 in the morning for that timezone and drops more or less steadily afterwards, indicating slight preference of European working time. There’s a significant but short drop on Friday – without further investigation we could again blame netsplit or another technical issue on the IRC server side. Of course, when comparing this drop with previous chart we have to take y axis scaling into account – note that the first graph started at 0 while this one has been autoscaled by Zabbix to start at 70. The drop would be barely noticeable if we would set the y axis scale to start at 0.

With the channel seeing a healthy increase we welcome you all to discuss (mostly) Zabbix related things in there right now.

This entry was posted in Community, Social, Technical and tagged . Bookmark the permalink.

Leave a Reply