Re: [Monitorix-general] Monitorix alerts

2016-12-01 Thread Jordi Sanfeliu
Hi,


On 11/22/2016 10:42 AM, chris wrote:
> Thank you Jordi for your feedback.
>
> Yes sure I can create a different alert script for each item. What I did.
>
> So If I would like to get alerts for CPU temperature I understand the
> lmsens.pm  or lmsens.rrd need to be modified ?
> I will create a request for this.

Yes, 'lmsens.pm' doesn't support alerts at all currently, so it needs to 
be implemented.

Thanks for creating the new issue.


>
>
> BTW is it possible to create a pm/rrd file to monitor my own metrics
> (like number of files generated per day by an application) ?
> Is there some documentation about this ?

Sure, you can take any of the current modules (.pm) as a good starting 
point as some other people already did.

No, there isn't any documentation on this, sorry. But all modules shar 
the same structure and I think they are pretty easy to follow, as long 
as you know Perl. Also, you don't need to be a Perl guru.

Anyway, feel free to ask any thing you need during that process.


>
>
> Thank you.
> Regards.
>

Best regards.

-- 
Jordi Sanfeliu
FIBRANET Network Services Provider
http://www.fibranet.cat

--
___
Monitorix-general mailing list
Monitorix-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/monitorix-general


Re: [Monitorix-general] Monitorix alerts

2016-11-14 Thread Jordi Sanfeliu
Hi Chris,

On 11/13/2016 05:44 PM, chris wrote:
> Hi All,
> I really appreciate the tool and use it daily on a few servers.
> I wanted to customize it regarding my needs but seems not to be able to
> do so.
>
> I have a couple of questions regarding the alerts in Monitorix.
> Can I add more arguments to the alerts lines (more than 3, especially to
> pass the disk/volume name) ?
> 
> /home = "/home", 3600, 90, /root/monitorix-alert.sh
> 
>
> I tried this and changing the script like this.
> ITEM=$1
> ALERT_TIMEINTVL=$2
> ALERT_THRESHOLD=$3
> current_value=$4
>
>
> But it doesn't work. It works fine with the 3 arguments.

Since each filesystem has its own alert and alert-script it shouldn't be 
difficult for you to get an idea of the name of the filesystem that is 
triggering such alert. You can even name your scripts as the filesystem 
name each represents, and even being all of them a (symbolic) link of a 
generic script.

Inside that generic script you can differentiate different filesystems 
by checking the 'argv[0]' string.

As stated in the monitorix.conf(5) man page:

The external script will receive the following arguments:

 1st - the value defined as time interval.
 2nd - the value defined as threshold.
 3rd - the filesystem disk usage.



>
> Oher question, can I use alerts for lmsensors cpu/core temperature ?
> I tried to add a block like this
> 
> 
> core0   = Core 0
> core1   = Core 1
> mb0 = M/B Temp
> cpu0= CPU Temp
> fan0= fan1
> fan1= fan2
> fan2= fan3
> volt0   = VCore 1
> volt1   = VCore 2
> volt2   = \+3.3V
> volt3   = \+5V
> volt4   = \+12V
> volt5   = \-12V
> volt6   = \-5V
> volt7   = Battery
> gpu0= nvidia
> 
>
> 
> cpu0  = 300, 60, /root/monitorix-alert.sh
> core0 = 300, 60, /root/monitorix-alert.sh
> core1 = 300, 60, /root/monitorix-alert.sh
> 
> 
>
> But it doesn't work either.
>
> Any advice much appreciated. If not possible could it be added in next
> release ?
> Thank you.
> Regards,
> Chris
>

No, the 'lmsens.pm' module doesn't have alert capabilities. In fact, not 
all modules support them, just a few of them.

Open a new issue (in Github) if you want that feature to be included in 
future versions, and I'll see what can I do.

Regards.

-- 
Jordi Sanfeliu
FIBRANET Network Services Provider
http://www.fibranet.cat

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Monitorix-general mailing list
Monitorix-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/monitorix-general