monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [monit-dev] Adding a new keyword for a protocol test


From: Martin Pala
Subject: Re: [monit-dev] Adding a new keyword for a protocol test
Date: Fri, 07 Dec 2007 22:30:06 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071119 Iceape/1.1.7 (Debian-1.1.7-1)

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]