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


     Re: [nocol-users] MySQL monitor?

> > sql1 Critical dbi:mysql:mysql:localhost nocol xxyy select *
> > from user
> > sql2 Error    dbi:mysql:mysql:sql2      nocol xxyy select *
> > from user
> >
> Why even have people put the dbi: in the config file? Correct me if I'm
> wrong, but can't you just assume that and add it when you make the
> connection?

Yes I could have. But since I write DBI scripts anyway, I'm used to using
the above syntax. I figured it was just as easy to put it in. I don't edit
the config file so often that it's a pain.
> > The script will die if either the username/password doesn't work or if your
> > SQL is invalid.
> *nod* So I noticed. I think you'd probably want to have it fail rather
> than have the script die. I'll take a look at it and send some more
> feedback later on.

That was a bit of laziness on my part. Plus I figured there was some
advantage to getting immediate feedback if your username or SQL was bad.
Granted it doesn't catch the instance where the script is working but the
server administrator later removes the username. At that point the script
dies. I toyed with having it return some 'special' status and/or adding
messages to the nocol message directory and the updates file. In the end, I
just stayed lazy. Keepalive_monitors alerts me that the script died so I can


    Rick Beebe                                           (203) 785-6416
    Manager, Systems & Network Engineering          FAX: (203) 785-3978
    ITS-Med Client & Technology Services         Richard.Beebe@yale.edu   
    Yale University School of Medicine                                 
    P.O. Box 208078, New Haven, CT 06520-8078