Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Firebrick profiles - generating events  (Read 989 times)

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Firebrick profiles - generating events
« on: November 17, 2018, 08:39:05 AM »

I have managed to define some ‘profile’ objects in my Firebrick FB2700 successfully. It shows me the state value associated with each profile correctly, as a red or green coloured entry in the profiles page of the web UI, and the state values change as they should when the underlying conditions change. So all is well.

The documentation seems to have certain important parts missing imho. I can’t see how to make it generate an event happen when a profile-defined state changes, and what I would want to happen is for it to send some message to me. Is that possible? Am I just not seeing it?

I see that you can set the ‘profile’ attribute on certain objects in order to cause log entries to get written to a chosen log-target object. If the log-target object says that for example email is to get sent somewhere then that is a way of communicating log info to someone, but that doesn’t let you generate specific log entries if your choice or send individual messages. I can’t see anything about log entries associated with profile-defined state changes either: I would be interested in being able to generate an event called "Event abc: profile state xyz has changed: from x to y" and record these in a log or better send them as messages. It mentions SMS as a possible future development and so that makes it sound like there is thought of sending event messages, since you can’t SMS an entire log file to someone. But currently, it sounds as if when you associate objects with a log-target object, all log entries get written to that target, amongst other possible targets. You can make it conditional I think, if I am reading it correctly, because in some places you can add a ‘profile’ attribute to certain objects and I get the feeling that that acts as a kind of conditional statement, an ‘if (profile_xxx_state == true/active )’ controlling whatever that object is associated with. So I suspect you can have conditional logging, in the sense that you only have certain log entries recorded during the period while some profile_object’s state is true. And if I understand it, struggling with scant documentation, you can make some objects only apply or exist while some profile_object’s state is true. So if that’s right, then we have something like a general ‘if statement’, so there can be one configuration in force during the time that one profile-state is the case, and a different configuration applies during other periods.

As a specific example of what I’m interested in, I was wondering if I could generate a notification message when a DSL link goes down, so state change on a PPP object and I have created four profile objects one governed by each PPPoE object. There is also an additional profile object that is true when none of the per-PPPoE profile objects are true ie all DSL lines have gone down, and this is implemented as NOT( OR( pppoe_1, pppoe_2, pppoe_3, pppoe_4 ) ) so it goes true when we go into the failover state and switch to 3G backup. Now it would be good to generate a ‘we just went over to 3G’ event from that. And even better to generate a ‘we failed to go over to 3G; 3G down when we really need it - total comms loss’ event. Not that I can send that vital message anyway, with no comms at all, but it would arrive later and would record the time it all went horribly wrong.

I don’t see how to record things of your choice in the log generally, never mind my wish list items ‘generating events’ or ‘sending messages’.
Logged

andrew-AAISP

  • ISP Rep
  • Member
  • *
  • Posts: 41
    • aa.net.uk
Re: Firebrick profiles - generating events
« Reply #1 on: December 04, 2018, 10:33:13 AM »

I have managed to define some ‘profile’ objects in my Firebrick FB2700 successfully. It shows me the state value associated with each profile correctly, as a red or green coloured entry in the profiles page of the web UI, and the state values change as they should when the underlying conditions change. So all is well.

The documentation seems to have certain important parts missing imho. I can’t see how to make it generate an event happen when a profile-defined state changes, and what I would want to happen is for it to send some message to me. Is that possible? Am I just not seeing it?

You can set a profile to Log; you can create a Log target that will email you.
Logged
A&A

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Firebrick profiles - generating events
« Reply #2 on: December 04, 2018, 05:42:10 PM »

Andrew, the log-target thing, is this something different from what I am thinking about though?

If I set up a log-target and that is linked to a profile, does it mean the following
   "Record entries relating to various kinds of events in that log object while the profile is true."

But those log entries could be all kinds of things?

The log target could involve emailing all those entries. But you don’t control what those events are?

What I am after though is a way of generating one notification, say a single email / SMS / tweet / syslog / SNMP trap message, when the value of a profile changes. (Leaving aside the exotic purely thought-experiment ideas discussed.)

Have I misunderstood ?
« Last Edit: December 05, 2018, 09:20:10 PM by Weaver »
Logged

andrew-AAISP

  • ISP Rep
  • Member
  • *
  • Posts: 41
    • aa.net.uk
Re: Firebrick profiles - generating events
« Reply #3 on: December 04, 2018, 09:11:58 PM »

Maybe pop in to IRC during the day and we can chat about what you're wanting - if that's possible?
Logged
A&A