Munin graph

Third-party modifications and add-ons, Apps and Clients

Moderator: moderators

Munin graph

Postby PoGo » Thu Feb 09, 2012 10:58 pm

Hello,
I wrote a plugin for munin to graph the active users in Subsonic (users currently playing music/video) : you can find it here

Just add it in your /etc/munin/plugins directory and don't forget to set the URL, LOGIN, PASSWORD options (login/password of a existing account in your subsonic)
I personally created an account for Munin with no right (can't even play music).

After few minutes you should see something like that :
Image

The plugin is working with version 4.6 (build 2585), and I have no idea if it can work with any previous version.

Cheers.

[EDIT]
v1.1 : Updated the parsing of the JSESSIONID
v1.2 : Automaticaly delete the cookie
v1.3 : Use the API
Last edited by PoGo on Thu May 10, 2012 8:32 am, edited 8 times in total.
PoGo
 
Posts: 36
Joined: Thu Apr 21, 2011 11:07 pm

Re: Munin graph

Postby rino655 » Mon Feb 13, 2012 10:37 pm

oh hell yea! Thank you sir, I will let be trying this out tonight.
rino655
 
Posts: 8
Joined: Thu Jun 30, 2011 3:14 pm

Re: Munin graph

Postby muiz » Tue Feb 14, 2012 12:14 am

Where do i find : /etc/munin/plugins directory ?
muiz
 
Posts: 86
Joined: Wed Feb 02, 2011 11:52 am

Re: Munin graph

Postby fonsoy » Tue Feb 14, 2012 8:51 am

I take it this app is for Linux users only? :P
fonsoy
 
Posts: 38
Joined: Mon Jan 10, 2011 12:07 pm

Re: Munin graph

Postby PoGo » Tue Feb 14, 2012 10:35 am

fonsoy wrote:I take it this app is for Linux users only? :P
Indeed.
There is a windows version of Munin, you can give a try : http://code.google.com/p/munin-node-win32/
PoGo
 
Posts: 36
Joined: Thu Apr 21, 2011 11:07 pm

Re: Munin graph

Postby snoopyp » Fri Apr 13, 2012 8:43 am

Hi,

Thanks for the plugin.

At the end of the script, missing:
print "users.value $users";
snoopyp
 
Posts: 8
Joined: Fri Apr 13, 2012 8:39 am

Re: Munin graph

Postby snoopyp » Fri Apr 13, 2012 10:30 am

Image

I think I have an error: nb of user is x2. I have try with 1 user and 2, see 2 and 4 in munin.
Last edited by snoopyp on Fri Apr 13, 2012 1:10 pm, edited 1 time in total.
snoopyp
 
Posts: 8
Joined: Fri Apr 13, 2012 8:39 am

Re: Munin graph

Postby PoGo » Fri Apr 13, 2012 12:52 pm

Strange, I updated the script with a new version, you can try this one (see first post)
Also which version, do you use ? This script has only been tested on 4.6 (build 2585), I really don't know it's behavior with a previous version of subsonic.

Cheers.
PoGo
 
Posts: 36
Joined: Thu Apr 21, 2011 11:07 pm

Re: Munin graph

Postby snoopyp » Fri Apr 13, 2012 1:04 pm

I have: 4.6 (build 2583) - 2011-12-06

Where do you find v2585? I see lastet war version:
subsonic-4.6-war.zip 2011-12-06 18.3 MB

I have add this at the end:

#Print the result
$users=$users/2;
print "users.value $users\n";
snoopyp
 
Posts: 8
Joined: Fri Apr 13, 2012 8:39 am

Re: Munin graph

Postby snoopyp » Tue Apr 17, 2012 12:23 pm

mmm sometimes I have values with coma :/.
2,5 users...

What is your version?
snoopyp
 
Posts: 8
Joined: Fri Apr 13, 2012 8:39 am

Re: Munin graph

Postby PoGo » Thu Apr 19, 2012 2:04 pm

PoGo wrote:The plugin is working with version 4.6 (build 2585), and I have no idea if it can work with any previous version.
PoGo
 
Posts: 36
Joined: Thu Apr 21, 2011 11:07 pm

Re: Munin graph

Postby snoopyp » Thu Apr 26, 2012 8:05 am

Where did you find this version?
I have the last war version...
snoopyp
 
Posts: 8
Joined: Fri Apr 13, 2012 8:39 am

Re: Munin graph

Postby PoGo » Thu Apr 26, 2012 9:11 am

snoopyp wrote:Where did you find this version?
I have the last war version...

It's the .deb version : http://www.subsonic.org/pages/download2.jsp?target=subsonic-4.6.deb
PoGo
 
Posts: 36
Joined: Thu Apr 21, 2011 11:07 pm

Re: Munin graph

Postby snoopyp » Wed May 09, 2012 9:13 am

Ok, thanks.
I will be wait the 4.7 version :).
snoopyp
 
Posts: 8
Joined: Fri Apr 13, 2012 8:39 am

Re: Munin graph

Postby PoGo » Thu May 10, 2012 8:02 am

Also, remind that it's a "quick and dirty" way of doing.
If an user decided not to show what he's currently listening, he won't be included into the stats.

The best way I think is to ask Sindre an API to simply access to the right value.

[EDIT]
Talking of an API, there IS an API to properly get this value, I udated my script (can be found into my first post).
Last edited by PoGo on Fri May 25, 2012 9:06 am, edited 1 time in total.
PoGo
 
Posts: 36
Joined: Thu Apr 21, 2011 11:07 pm

Next

Return to Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 3 guests