[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: {Disarmed} Re: [monit] Is this possible?
From: |
Tomich,John |
Subject: |
RE: {Disarmed} Re: [monit] Is this possible? |
Date: |
Thu, 31 Jul 2008 12:20:44 -0500 |
And monit process owner has execute access to restart.sh? If so, maybe
try using timestamp directive instead of checksum.
Regards,
jt
888888888888
John Tomich, IS Web Infrastructure
Tempe campus
* 480.337.5854
If you are not the intended recipient of this message (including attachments),
or if you have received this message in error, immediately notify us and delete
it and any attachments. If you no longer wish to receive e-mail from Edward
Jones, please send this request to address@hidden You must include the e-mail
address that you wish not to receive e-mail communications. For important
additional information related to this e-mail, visit
www.edwardjones.com/US_email_disclosure
-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Dimitri Yioulos
Sent: Thursday, July 31, 2008 10:16 AM
To: This is the general mailing list for monit
Subject: Re: {Disarmed} Re: [monit] Is this possible?
Yes, it's root's home. So, myfile.sql lives in /root. I suppose I
could move it to, say, /usr/loca/scripts, which would then become the
path in the directive in question, but what difference would that make?
On Thursday 31 July 2008 1:07 pm, Tomich,John wrote:
> Silly question - you actually have a directory named 'root' under '/'?
>
>
> Regards,
>
> jt
>
> 888888888888
> John Tomich, IS Web Infrastructure
> Tempe campus
> * 480.337.5854
>
>
>
>
> If you are not the intended recipient of this message (including
> attachments), or if you have received this message in error,
> immediately notify us and delete it and any attachments. If you no
> longer wish to receive e-mail from Edward Jones, please send this
> request to address@hidden You must include the e-mail
> address that you wish not to receive e-mail communications. For
> important additional information related to this e-mail, visit
> www.edwardjones.com/US_email_disclosure
>
> -----Original Message-----
>
>
> From: address@hidden
> [mailto:address@hidden
> On Behalf Of Dimitri Yioulos
> Sent: Thursday, July 31, 2008 9:54 AM
> To: This is the general mailing list for monit
> Subject: Re: {Disarmed} Re: [monit] Is this possible?
>
> John,
>
> I changed the directive to read:
>
> check file brockton.pid path /var/lib/mysql
> if changed checksum
> then exec "/root/restart.sh"
>
> Still no joy. Grrrr.
>
> Dimitri
>
> On Thursday 31 July 2008 12:33 pm, Tomich,John wrote:
> > Dimitri,
> >
> > I'm no monit expert, but all the examples of checkfile I've seen do
> > not repeat the actual filename to check in the 'with path' string.
> > Perhaps you need to end your path with the directory where the
> > script you want to run lives?
> >
> >
> > Regards,
> >
> > jt
> >
> > 888888888888
> > John Tomich, IS Web Infrastructure
> > Tempe campus
> > * 480.337.5854
> >
> >
> >
> >
> > If you are not the intended recipient of this message (including
> > attachments), or if you have received this message in error,
> > immediately notify us and delete it and any attachments. If you no
> > longer wish to receive e-mail from Edward Jones, please send this
> > request to address@hidden You must include the e-mail
> > address that you wish not to receive e-mail communications. For
> > important additional information related to this e-mail, visit
> > www.edwardjones.com/US_email_disclosure
> >
> > -----Original Message-----
> >
> >
> > From: address@hidden
> > [mailto:address@hidden
> > ]
> > On Behalf Of Dimitri Yioulos
> > Sent: Thursday, July 31, 2008 9:23 AM
> > To: This is the general mailing list for monit
> > Subject: Re: {Disarmed} Re: [monit] Is this possible?
> >
> > (I'm not sure if I should be top-posting, but to keep the thread
> > consistent, I'm top-posting)
> >
> > The command is mysql start, and not mysqld start. The restart of
> > MySQl works fine. I created an simple bash script to execute
> > "myfile.sql", which I tested and know works. So, the second
> > directive
>
> looks like this:
> > check file brockton.pid path /var/lib/mysql/brockton.pid
> > if changed checksum
> > then exec "/root/restart.sh"
> >
> > However, the script doesn't seem to fire off. So, I'm almost there,
> > but the most important part (the MySQL table work) isn't happening.
> > Any ideas as to why?
> >
> > Dimitri
> >
> > On Thursday 31 July 2008 11:34 am, Pierrick Grasland wrote:
> > > just in case :
> > >
> > > mysql or mysqld ?
> > >
> > > if it's the second, then your error is here :
> > >
> > > start program = "/etc/rc.d/init.d/mysql*d* start"
> > > stop program = "/etc/rc.d/init.d/mysql*d* stop"
> > >
> > > On Thu, Jul 31, 2008 at 5:20 PM, Dimitri Yioulos
> >
> > <address@hidden>wrote:
> > > > On Thursday 31 July 2008 10:54 am, Dimitri Yioulos wrote:
> > > > > On Thursday 31 July 2008 9:55 am, Pierrick Grasland wrote:
> > > > > > Hello,
> > > > > >
> > > > > > I hope to correctly understand your problem :
> > > > > >
> > > > > > *executing a script after mysql restart.*
> > > > > >
> > > > > > So, my first solution is below :
> > > > > > >From the manual :
> > > > > >
> > > > > > ***IF CHANGED [MD5|SHA1] CHECKSUM [[<X>] <Y> CYCLES]
> > > > > > THEN action*
> > > > > >
> > > > > > or
> > > > > >
> > > > > > ***IF CHANGED TIMESTAMP [[<X>] <Y> CYCLES] THEN action*
> > > > > >
> > > > > >
> > > > > > I think you can adapted this as follow :
> > > > > >
> > > > > > check file mysqlpidfile path <path of pidfile>
> > > > > > if changed sha1 checksum
> > > > > > then exec "mysqlreload.sh"
> > > > > >
> > > > > >
> > > > > > Add a simple :
> > > > > >
> > > > > > check process mysql with pidfile mysqlpidfile start = "..."
> > > > > > stop = "..."
> > > > > >
> > > > > > And I think you have it.
> > > > > >
> > > > > > (when mysql restart, it will have a new pid, so a different
> > > > > > checksum or timestamp
> > > > > >
> > > > > > I'm not sure of the syntax (can't test), but I think it will
> >
> > work.
> >
> > > > > > Regards,
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Pierrick Grasland
> > > > >
> > > > > Pierrick,
> > > > >
> > > > > Thank you so much!
> > > > >
> > > > > Not having a lot of experience creating monit directives, I'm
> > > > > not sure exactly what to do with the directives you've shown
me.
> > > > >
> > > > > To accomplish
> > > >
> > > > what
> > > >
> > > > > I want to do, would my directives look like this?:
> > > > >
> > > > > check process mysqld with pidfile /var/lib/mysql/brockton.pid
> > > > > start program = "/etc/rc.d/init.d/mysql start"
> > > > > stop program = "/etc/rc.d/init.d/mysql stop"
> > > > > if failed host 192.168.100.7 port 3306 type TCP then restart
> > > > > if 5 restarts within 5 cycles then timeout
> > > > >
> > > > > check file /var/lib/mysqld/brockton.pid
> > > > > if changed sha1 checksum
> > > > > then exec "mysql test1 < /root/restart.sql"
> > > > >
> > > > > If so, when I try to start monit, I get the follwing error:
> > > > >
> > > > > Starting monit: /etc/monitrc:216: Error: syntax error 'if'
> > > > >
> > > > > [FAILED]
> > > > >
> > > > > Where am I going wrong?
> > > > >
> > > > > Dimitri
> > > >
> > > > Sorry to respond to my own post, but I corrected one of the
> > > > directives (should have followed Pierrick's directions
> > > > explicitly
> > > >
> > > > :-) ) to read:
> > > >
> > > > check file brockton.pid path /var/lib/mysqld/brockton.pid
> > > > if changed sha1 checksum
> > > > then exec "mysql test1 < /root/restart.sql"
> > > >
> > > > and the error I quoted in my last post went away. However, it's
> > > > been replaced
> > > > by:
> > > >
> > > > Starting monit: /etc/monitrc:217: Error: the executable does not
> > > > exist 'mysql'
> > > >
> > > > [FAILED]
> > > >
> > > > The script I'm using to do the table changes in MySQL is in the
> > > > form
> > > >
> > > > "myfile.sql", and is executed with the command "mysql
> > > > databasename
> > > >
> > > > <
> > > >
> > > > myfile.sql". Monit seems to be tripping over this. Am I not
> > > > able
> > > >
> > > > to execute this command via monit?
> > > >
> > > > Dimitri
> > > >
> > > > --
> > > > This message has been scanned for viruses and dangerous content
> > > > by
> > > >
> > > > MailScanner, and is believed to be clean.
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe:
> > > > http://lists.nongnu.org/mailman/listinfo/monit-general
> > >
> > > --
> > > Pierrick Grasland
> >
> > --
> > This message has been scanned for viruses and dangerous content by
> > MailScanner, and is believed to be clean.
> >
> >
> >
> > --
> > To unsubscribe:
> > http://lists.nongnu.org/mailman/listinfo/monit-general
> >
> >
> > --
> > To unsubscribe:
> > http://lists.nongnu.org/mailman/listinfo/monit-general
>
> --
> This message has been scanned for viruses and dangerous content by
> MailScanner, and is believed to be clean.
>
>
>
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general
>
>
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general
--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
- Re: [monit] Is this possible?, (continued)
- Re: [monit] Is this possible?, Pierrick Grasland, 2008/07/31
- Re: [monit] Is this possible?, Dimitri Yioulos, 2008/07/31
- Re: [monit] Is this possible?, Pierrick Grasland, 2008/07/31
- Re: [monit] Is this possible?, Dimitri Yioulos, 2008/07/31
- Re: [monit] Is this possible?, Pierrick Grasland, 2008/07/31
- Re: {Disarmed} Re: [monit] Is this possible?, Dimitri Yioulos, 2008/07/31
- RE: {Disarmed} Re: [monit] Is this possible?, Tomich,John, 2008/07/31
- Re: {Disarmed} Re: [monit] Is this possible?, Dimitri Yioulos, 2008/07/31
- RE: {Disarmed} Re: [monit] Is this possible?, Tomich,John, 2008/07/31
- Re: {Disarmed} Re: [monit] Is this possible?, Dimitri Yioulos, 2008/07/31
- RE: {Disarmed} Re: [monit] Is this possible?,
Tomich,John <=
- Re: {Disarmed} Re: [monit] Is this possible?, Dimitri Yioulos, 2008/07/31
- RE: {Disarmed} Re: [monit] Is this possible?, Tomich,John, 2008/07/31
- Re: {Disarmed} Re: [monit] Is this possible?, Dimitri Yioulos, 2008/07/31
- RE: {Disarmed} Re: [monit] Is this possible?, Tomich,John, 2008/07/31
- Re: {Disarmed} Re: [monit] Is this possible?, Scott Silva, 2008/07/31
- Re: {Disarmed} Re: [monit] Is this possible?, Dimitri Yioulos, 2008/07/31
- Re: {Disarmed} Re: [monit] Is this possible?, Dimitri Yioulos, 2008/07/31
- Re: {Disarmed} Re: [monit] Is this possible?, Scott Silva, 2008/07/31
- Re: {Disarmed} Re: [monit] Is this possible?, Pierrick Grasland, 2008/07/31
- Re: {Disarmed} Re: [monit] Is this possible?, Dimitri Yioulos, 2008/07/31