FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Server Development

 
 
LinkBack Thread Tools
 
Old 06-17-2010, 05:39 PM
Kaushal Shriyan
 
Default collectd application

Hi,

I am using collectd on ubuntu server 8.04. I have a special
requirement is that i need to send png graphs which has to be embed on
the email body to a particular team.
I do have multiple hosts with multiple plugins

is there a easy and efficient way to do it ?

Please suggest/guide

Thanks and Regards

Kaushal

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 06-17-2010, 05:39 PM
Kaushal Shriyan
 
Default collectd application

Hi,

I am using collectd on ubuntu server 8.04. I have a special
requirement is that i need to send png graphs which has to be embed on
the email body to a particular team.
I do have multiple hosts with multiple plugins

is there a easy and efficient way to do it ?

Please suggest/guide

Thanks and Regards

Kaushal

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-17-2010, 06:01 PM
Victor Churchill
 
Default collectd application

If you can list the graphs you can mime-construct to make the mail and send it.

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 06-17-2010, 06:10 PM
Kaushal Shriyan
 
Default collectd application

On Thu, Jun 17, 2010 at 11:31 PM, Victor Churchill
<victorchurchill@gmail.com> wrote:
> If you can list the graphs you can mime-construct to make the mail and send it.
>

Hi Victor,

For example I do wget -O file.png
"http://collectd.example.com/collectd/cgi-bin/collection.cgi?action=show_plugin;host=testdb;time span=day;plugin=mysql"
for a single host "testdb" and plugin "mysql"

I do /usr/bin/mime-construct --header 'Sender: MOR_FAX@TEST.COM'
--header 'From: MOR_FAX@TEST.COM' --to your@mail.com --subject 'Email
test' --file-attach /var/tmp/file.png

That would be a manual way of doing it. I do have numerous servers and
multiple plugins. Basically i would like to do it without manual
intervention.
Please suggest further to send multiple png files from multiple
servers with multiple collectd plugins

Thanks,

Kaushal

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 06-17-2010, 10:59 PM
"Fabio T. Leitao"
 
Default collectd application

Man,*
I think you want to send via email those PNG files, right?
If so, I usually use mailx (instead of mail) to create a message with attachments...
Its not on any ubuntu by default but you are an apt-get install away.


Its pretty straight forward, I believe if you read the man you wont have any problems.

--
Fábio Leitão
..-. .- -... .. --- *.-.. . .. - .- --- *...-.-



--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 06-18-2010, 05:03 PM
PleegWat
 
Default collectd application

On 06/17/2010 07:39 PM, Kaushal Shriyan wrote:
> Hi,
>
> I am using collectd on ubuntu server 8.04. I have a special
> requirement is that i need to send png graphs which has to be embed on
> the email body to a particular team.
> I do have multiple hosts with multiple plugins
>
> is there a easy and efficient way to do it ?
>
> Please suggest/guide
>
> Thanks and Regards
>
> Kaushal
>

I can't give you any specific guidelines, but I know collectd comes with
a web frontend in the form of a cgi script, which includes graphs. This
script should be invocable from the command line, which should allow
embedding these graphs in emails.
However, I'm not sure what image format is used for those graphs.

PleegWat

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-18-2010, 06:25 PM
Victor Churchill
 
Default collectd application

This sounds like a scripting issue rather than a mail one now.

DATE=`date +%Y%m%d`
for SVR in server1 server2 serverx; do
for PLG in plugin1 plugin2 pluginz; do
wget -O $SVR_$PLG_$DATE.png
"http://collectd.example.com/...host=$SVR;plugin=$PLG"
/usr/bin/mime-construct ... /var/tmp/$SVR_$PLG_$DATE.png
done
done

(not tested!) should send one mail for each chart. If you want all the
images in one email you would have to put the mime-construct outside
the loops and add each .png with a separate file-attach clause.

And then automate it with crontab.

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 

Thread Tools




All times are GMT. The time now is 03:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org