I'm not sure what you try to do ... if you try to add new protocol for tcp/ucp tests, then you can see protocols/NOTES for hints. If you try to add new test, then you need to add it to the service check options as well (see for example opthost in p.y)

Martin


Pierrick wrote:
Hello,

I'm trying to create a new test for SIP, and, in order to make a useful
test, I need to change the receiver uri. So, I have add a new keyword (touri), paired with corresponding tokens on
p.y and l.l :

l.l
touri             { return TOURI; }

p.y
%token <string> TOURI


In order to complete my work, I also create a function, wich is based on the
behavior for REQUEST :

touri           : /* EMPTY */
                | TOURI STRING {
                    DEBUG("to uri\n");
                    verifyToUri(&portset, $2);
                    FREE($2);
                  }

static void verifyToUri(Port_T port, char * touri) {
ASSERT(touri); char * to = port->touri; if (to == NULL) {
    NEW(to);
    port->touri = to;
  }
if (touri != NULL) {
    to=xstrdup(touri);
  }
}

But, when I try ./monit -v validate, my only result is :
/etc/monit/ser.rc:7: Error: syntax error 'touri'

Can anyone give me some clues on "how to add keyword" please.


_______________________________________________
monit-dev mailing list
monit-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monit-dev

Reply via email to