Hello Guys,
I'm quite new to writing codes and i have the following problem:I want to create an alarm which is bound to a specific gateway. To this alarm there should be a message which tells me that I'm in the right Gateway. If I'm not in the right Gateway there should be a message which tells me that I am in the wrong Gateway. Right now I can only see my Gateway and the RAM usage.
The code is the following:
[options]
top=0
right=0
width=340
font-face=Arial
font-size=10
log=desktopinfo.log
log-level=debug
[screen-saver]
font-size=16
width=800
formcolor=501020
font-face=Arial
centerv=1
centerh=1
[options-w]
top=100
centerh=1
width=850
font-face=Arial
font-size:10
formcolor=501020
log=desktopinfo.log
log-level=debug
[text]
noresults=<n/a>
error=[error]
null-result=
unknown=Unknown
executing=<executing>
menu-ini=Select Config
menu-export=Export
menu-reload=Reload
menu-configuration=Edit Configuration
menu-log=Open Log File
menu-manual=Read Manual
menu-wmode=Start W Mode
menu-about=About Desktop Info
menu-quit=Quit
nav-previous=Previous Page
nav-home=Home Page
nav-next=Next Page
[items]
COLOR=#ffffff
COMMENT=style:w,font-face:Comic Sans MS,font-size:120%,text:Desktop Info
# Display Gateway
NETWORKINTERFACES=interval:3,font-size:150%,text:Gateway,hide-no-result:1,display:%17,filter:(%17 ne 0.0.0.0),alarms:(
%17 eq %17 00FF00, message:right Gateway!,
%17 ne %17 FF0000, message:not the right Gateway!
)
# RAM Usage
PHYSICALRAM=interval:20,font-size:120%,color:b0ffb0,alarms:(%3 ge 80 0000FF),display:%1[3.1b]B / %2[3.1b]B
I tried to use a fix value for the NETWORKINTERFACES part after "%17 eq/ne ..." but this doesn't works either. (For example: %17 eq 123.12.12.1 00FF00, message:right Gateway!)
I hope that you can help me
Best regards
where did you get the 'message" bit from? Have a read around page 35 in the manual.
@glenn Sorry it shouldn't be a "message" but a comment. But this isn't working as well. So I wanted to ask if there is a possibility at all to connect an alarm to the condition of the value of the gateway. So that the comment is telling you if you are in the right or wrong gateway.
you probably want to add a 'set' option to NETWORKINTERFACES then follow that with IF item. But first you have to define what is 'the right gateway'.
NETWORKINTERFACES=interval:3,font-size:150%,text:Gateway,hide-no-result:1,display:%17,filter:(%17 ne 0.0.0.0),set gateway=%17 IF=value1:%gateway%,value2:right gateway,comp:eq,true:Right Gateway,false:Not The Right Gateway