type forward type online_user flush_interval 10s #redis configuration #host localhost #port 6379 #db_index 0 #redis_try 3 #inactive timeout, default 30 minutes #session_timeout 1800 # prefix of the keys stored into Redis #redis_key_prefix counter:online_user: # how do you define unique user ? # the default is to find 'uid' field in record # for support both members and non-members, try: #user_identify uid|ip #emit online user count event periodically or not #silent false #the tag prefix for emitted event #tag online_user #besides counting the overall online users #also wanna count online users for each segment ? #if so, use the segment directive #segmented by tag #segment tag #segmented by a specified field #segment service #segmented by regexp-captured string #the format is: capture __FIELD__ __REGEXP__ #segment capture name /^\w+:(\w+):/ type stdout