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) ?
>         <alerts>
>                 /home = "/home", 3600, 90, /root/monitorix-alert.sh
>         </alerts>
>
> 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
> <lmsens>
>         <list>
>                 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
>         </list>
>
>         <alerts>
>                 cpu0  = 300, 60, /root/monitorix-alert.sh
>                 core0 = 300, 60, /root/monitorix-alert.sh
>                 core1 = 300, 60, /root/monitorix-alert.sh
>         </alerts>
> </lmsens>
>
> 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

Reply via email to