Re: [Nagios-users] Problem with Send_NSCA on Windows
Hi, I know how to echo a message on the console . my problem is of redirecting the string to Send_Nsca.exe , which needs to be sent to the Nagios Server for the passive service check. Any mechanism for doing it will be helpfull. When I tried redirection through a file to the SendNsca.exe, it gave me the message "0 packets Sent to the Nagios Server". @ Anthony thanks for the Pointer to NC_Net. Its a good tool and seems to be doing more than I need for at the moment. Thanks Ankit "Anthony Montibello" <[EMAIL PROTECTED]> 01/24/2008 06:26 AM To [EMAIL PROTECTED] cc "Nagios Users" Subject Re: [Nagios-users] Problem with Send_NSCA on Windows Actually C# Does have echo, try System.Console.WriteLine("ECHO TO STANDARD IO"); you can also write to standard error and you can also redirect IO streams, C# give pleanty of ways for doing this, since it is a full development language and the Dot NEt Framework offers pleanty of classes, Go to MSDN and read throught the Library. particullary the IO,Console, and posibly the Process class depending on how you want to accomplish things. Using C# NC_Net can feed an IO into Win32_Send_NSCA.exe I also wrote my own version of SendNSCA in C# (internally in NC_NEt) doing that is a bit too complicated to discuss, but to oversimpify things: To reimplement SendNSCA just convert the Send_nsca.c into C# FOr commiunicating with Win32SEnd_Nsca read up on running processes Asyncronous and Syncronously. (spelling may be off) Have you tried using NC_NEt it provides both Active and Passive checks in a single windows plugin client It also has the ability to run other Scripts loaded into its script folder. IT is availible on sourceforge: http://sourceforge.net/projects/nc-net TOny (Author of NC_Net) On Jan 23, 2008 8:13 AM, <[EMAIL PROTECTED]> wrote: Hi, I am trying to monitor windows machines passively. For the same, I am writing some code in C#. The problem is, C# does not support anything like echo command(The way we used to do it on Linux). I have tried to redirect the output from a file to the send_nsca exe, but to no avail. Can you suggest some formats in which the information can be passed to the send_nsca exe ? Thanks Ankit =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null ForwardSourceID:NT0001D2C6 =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Problem with high latencies after going distributed
>-Original Message- >From: Thomas Guyot-Sionnest [mailto:[EMAIL PROTECTED] >Sent: Wednesday, January 23, 2008 10:24 PM >To: Frost, Mark {PBG} >Cc: Nagios Users >Subject: Re: [Nagios-users] Problem with high latencies after >going distributed > >-BEGIN PGP SIGNED MESSAGE- >Hash: SHA1 > >On 23/01/08 10:41 AM, Frost, Mark {PBG} wrote: >> >> >> >> This seems like a serious impediment to normal functioning of a >> distributed >> Nagios setup. That is, in order to make all but the smallest >> distributed node setups >> work you have to come up with this roll-your-own setup. I >haven't read >> the >> "new in Nagios 3" doc in a while. Is this something that is fixed in >> some way there? > >I don't think so. I remember an email from Ton Voon some time >ago asking >Ethan why the oc[hs]p command are run serially but I don't recall if >there was a reply or what else was said... > >I believe it's either documented in the official doc or some >user-contributed doc that the oc[hs]p commands should return as soon as >possible. It's usually done in Perl using a fork: > >if (fork==0) { > # send stuff via NSCA here... >} >exit(0); > I guess what I'm thinking here is that unlike a custom check, I can't see most people needing to customize the passive check result process. All the solutions I've seen seem to include a named pipe. So why couldn't Nagios support making the ocsp/ochp "commands" just named pipes instead. Then instead of a standalone send_nsca binary, have the nsca source build a send_nscaD binary (I'm making that up) that reads from the pipe that nagios writes to and sends directly to nsca on the server. That sort of eliminates the middle-man in the process of reporting passive check results. I know, I know, I'm free to write the send_nscaD.c code and send it to Ethan :-) >Although it may work for you, that solution will not scale as >well as my >OCP_Daemon because running the perl script to fork takes some >time. Just >as an example, running the following command on my Nagios server takes >between 1 and 2.5 second: > >$ time for ((i=0; i<100; i++)); do perl -e 'if (fork==0) { open (CAT, >"|/bin/cat >/dev/null") or die $!; print CAT >"$ARGV[0]\t$ARGV[1]\t$ARGV[2]\t$ARGV[3]\n"; close (CAT); }' >host service >status result; done > >That's obviously not counting the time it takes for Nagios to process >the macros, set the environment, etc. Send_nsca will also add much more >load to the system than a "cat >/dev/null". On any system running near >Nagios limitations that additional time will just be too much. > >I don't know how many people use OCP_Daemon but I had reports >from a few >people that greatly reduced their latency using it and I >haven't had any >bug reported yet. I believe it's well documented as well, but If you >have any feedback on this I'll be happy to get it. > > >Thomas I'm playing with it a bit and have so far had good results. I'll have some feedback after I've played with it a bit longer. Thanks for writing it and writing up the docs for it as well! Mark >-BEGIN PGP SIGNATURE- >Version: GnuPG v1.4.6 (GNU/Linux) >Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > >iD8DBQFHmATN6dZ+Kt5BchYRApGBAJ4jvi3bJJYONRVUgebEa2WBYJuUFgCeNN+j >tfBA9lbjORu63kPbg1aMpOo= >=sNiQ >-END PGP SIGNATURE- > - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Problem with high latencies after going distributed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 23/01/08 10:41 AM, Frost, Mark {PBG} wrote: > > >> -Original Message- >> From: Thomas Guyot-Sionnest [mailto:[EMAIL PROTECTED] >> Sent: Tuesday, January 22, 2008 10:29 PM >> To: Frost, Mark {PBG} >> Cc: Nagios Users >> Subject: Re: [Nagios-users] Problem with high latencies after >> going distributed >> >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> On 22/01/08 09:13 PM, Frost, Mark {PBG} wrote: >>> >>> -Original Message- From: Steve Shipway [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 22, 2008 8:45 PM To: Frost, Mark {PBG}; Nagios Users Subject: RE: [Nagios-users] Problem with high latencies after going distributed We've just done exactly the same (Nagios 2.9), and we have >> a comparable size of system (actually a bit larger - 713 hosts, 5834 services). After going distributed, we too have this insanely high >> latency on the satellites. The only possible cause is the OCSP command slowing things down somehow. This is using the supplied send_nsca call to send the >> status off to the central server... define command { command_namerelay command_line$USER1$/submit_check_result "$HOSTNAME$" "$SERVICEDESC$" "$SERVICESTATEID$" "$SERVICEOUTPUT$" } So it should work. I guess things would be better if it >> packaged the updates up into batches, although it cant do that normally. I think it might be better to make the OCSP command just dump the status to a file, and then have a cronjob every 60 seconds that >> reads the file and sends the statuses off as a batch. I will try this here, when I get the chance. Steve >>> >>> But if the submit_check_result is running slowly, that would >> only affect >>> the service >>> execution time wouldn't it? My understanding of check >> latency is that >>> it's the difference >>> in time between when Nagios schedules a check to run versus the time >>> that the check >>> actually starts to execute. >> You're right, but you're just missing one detail. Nagios runs checks in >> parallel and then reaps all the service results at once. While it's >> reaping it can't schedule other checks and it is in the reaping state >> that Nagios runs host check, event handlers, performance data commands >> and oc[hs]p commands. All this is done serially and can slow down >> significantly each service reaping run and thus delay the execution of >> further checks. >> >> I although I never built a distributed system, I designed mine to be >> easily distributed. Moreover, I used a technique I developed for >> latency-free performance-data processing (That I still heavily use BTW) >> to create a way to distribute check results to to a distributed central >> server in the same latency-free way (Was more like a fun project as I >> don't use it myself yet). >> >> Basically you use the host/service performance data files to get the >> data, but instead of writing to a file you write it to a named pipe >> (fifo). That pipe is then read by a high-performance non-blocking >> event-based Perl daemon (yeah I know that looks like marketing terms, >> but I can explain further each of them if you like) that forks >> send_nsca >> processes to send results in bulk (normally every few seconds though). >> >> So Nagios doesn't even loose time rotating a file and all your checks >> are transmitted almost instantly. See this wiki page for >> details and code: >> >> http://www.nagioscommunity.org/wiki/index.php/OCP_Daemon >> >> >> Thomas > > Interesting. Thanks for the explanation. If I understand this right, > the reason I > don't see this issue on my old non-distributed system is that when the > reaping occurs > there, it does not involve running oc[sh]p command which lops off a good > chunk of time > for the reaping process to complete. On the distributed node, the > reaping takes so long > that it affects Nagios' scheduling and actual check execution times and > thereby affects > latencies. > > This seems like a serious impediment to normal functioning of a > distributed > Nagios setup. That is, in order to make all but the smallest > distributed node setups > work you have to come up with this roll-your-own setup. I haven't read > the > "new in Nagios 3" doc in a while. Is this something that is fixed in > some way there? I don't think so. I remember an email from Ton Voon some time ago asking Ethan why the oc[hs]p command are run serially but I don't recall if there was a reply or what else was said... I believe it's either documented in the official doc or some user-contributed doc that the oc[hs]p commands should return as soon as possible. It's usually done in Perl using a fork: if (fork==0) { # send stuff via NSCA here... } exit(0); Although it may work for you, that solution will not scale as well as my OCP_Daemon
Re: [Nagios-users] how to monitor www.domain.com without host object
Thanks everyone! I really should have looked at the manual. The address directive in the host definition is pretty clearly explained: "This directive is used to define the address of the host. Normally, this is an IP address, although it could really be anything you want (so long as it can be used to check the status of the host). You can use a FQDN to identify the host instead of an IP address, but if DNS services are not availble this could cause problems. When used properly, the $HOSTADDRESS$ macro will contain this address. Note: If you do not specify an address directive in a host definition, the name of the host will be used as its address. A word of caution about doing this, however - if DNS fails, most of your service checks will fail because the plugins will be unable to resolve the host name." which is what you were all saying! darn manual! stupid reading! thanks guys ... i owe ya! august On Jan 24, 2008 2:03 PM, Yost, Karl <[EMAIL PROTECTED]> wrote: > You can put in a dns name for both the address and the hostname. I have > done this for checking websites before > > - Original Message - > From: [EMAIL PROTECTED] < > [EMAIL PROTECTED]> > To: Brock Kuhse <[EMAIL PROTECTED]> > Cc: nagios-users@lists.sourceforge.net > > Sent: Wed Jan 23 21:53:34 2008 > Subject: Re: [Nagios-users] how to monitor www.domain.com without host > object > > but the host has no ip. can i make a host entry without an ip? i only need > th host entry so i can create a service (which requires a host, right?). > then i http_check -I against a dns name? > > i'm guessing like this: > > > define host{ >use generic-host; Inherit default values > from a template >host_name www.mysite.com ; The name we're > giving to this host >alias Some Remote Host; A longer name associated > with the host > >address 192.168.1.50; IP address of the host >} > address is bogus, i just want to be able to associate a service against > this, i won't check it for anything. host_name is important because i need > that DNS value for my http_check: > > > > define command{ >namecheck_http >command_namecheck_http >command_line$USER1$/check_http -I $HOSTNAME$ >} > and use the HOSTNAME macro (not address) > > then create the service: > > > define service{ >use generic-service ; Inherit default values > from a template >host_name www.myhost.com >service_description HTTP >check_command check_http >} > > my theory is that i then get a host called www.myhost.com and have a > service being executed against that host that does an check_http and uses > the domain name (which is also the hostname and pulled by a macro) rather > than the IP (cause it doesn't exist) > > seems ok - but i think i'm making this harder than i should be :-) > > when you say "we simply create a host object with the hosted site's IP / > DNS" what does that look like? is the dns name the alias? > > a good example of this is www.9news.com which is with akamai (not my site) > if you dig it: > > [EMAIL PROTECTED] cfgs]# dig www.9news.com > > ; <<>> DiG 9.3.3rc2 <<>> www.9news.com > ;; global options: printcmd > ;; Got answer: > ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59275 > ;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 9, ADDITIONAL: 5 > > ;; QUESTION SECTION: > ;www.9news.com. IN A > > ;; ANSWER SECTION: > www.9news.com. 300 IN CNAME > www.9news.com.edgesuite.net. > www.9news.com.edgesuite.net. 21600 IN CNAME a21.g.akamai.net < > http://a21.g.akamai.net> . > a21.g.akamai.net. 20 IN A 210.9.72.174 > a21.g.akamai.net. 20 IN A 210.9.72.176 > > so to create a host to run the service check against is hard, cause the IP > changes. > > august > > > On Jan 24, 2008 1:25 PM, Brock Kuhse < [EMAIL PROTECTED]> wrote: > > >Sorry for the top post – I haven't quite figured out how to get > Outlook 2007 to behave properly when replying to HTML emails (switching to > plain text after I hit "Reply" doesn't seem to quote the original properly). > I'm sure I'll figure it out. Soon. > > > >Anyway, we monitor plenty of clients for whom we track the status > of their hosted sites in addition to their internal networks. For the > hosted sites, we simply create a host object with the hosted site's IP / DNS > name and assign checks normally (check_http variations primarily). > > > >- Brock > > > >From: [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] On Behalf Of August Simonelli >Sent: Wednesday, January 23, 2008 6:23 PM >To: nagios-users@lists.sourceforge.net >Subject: [Nagios-users] how to monitor www.domain.com without host > object > > > >Hi Nagios-ers ... > >I ne
Re: [Nagios-users] how to monitor www.domain.com without host object
but the host has no ip. can i make a host entry without an ip? i only need th host entry so i can create a service (which requires a host, right?). then i http_check -I against a dns name? i'm guessing like this: define host{ use generic-host; Inherit default values from a template host_name www.mysite.com ; The name we're giving to this host alias Some Remote Host; A longer name associated with the host address 192.168.1.50; IP address of the host } address is bogus, i just want to be able to associate a service against this, i won't check it for anything. host_name is important because i need that DNS value for my http_check: define command{ namecheck_http command_namecheck_http command_line$USER1$/check_http -I $HOSTNAME$ } and use the HOSTNAME macro (not address) then create the service: define service{ use generic-service ; Inherit default values from a template host_name www.myhost.com service_description HTTP check_command check_http } my theory is that i then get a host called www.myhost.com and have a service being executed against that host that does an check_http and uses the domain name (which is also the hostname and pulled by a macro) rather than the IP (cause it doesn't exist) seems ok - but i think i'm making this harder than i should be :-) when you say "we simply create a host object with the hosted site's IP / DNS" what does that look like? is the dns name the alias? a good example of this is www.9news.com which is with akamai (not my site) if you dig it: [EMAIL PROTECTED] cfgs]# dig www.9news.com ; <<>> DiG 9.3.3rc2 <<>> www.9news.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59275 ;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 9, ADDITIONAL: 5 ;; QUESTION SECTION: ;www.9news.com. IN A ;; ANSWER SECTION: www.9news.com. 300 IN CNAME www.9news.com.edgesuite.net. www.9news.com.edgesuite.net. 21600 IN CNAME a21.g.akamai.net. a21.g.akamai.net. 20 IN A 210.9.72.174 a21.g.akamai.net. 20 IN A 210.9.72.176 so to create a host to run the service check against is hard, cause the IP changes. august On Jan 24, 2008 1:25 PM, Brock Kuhse <[EMAIL PROTECTED]> wrote: > Sorry for the top post – I haven't quite figured out how to get Outlook > 2007 to behave properly when replying to HTML emails (switching to plain > text after I hit "Reply" doesn't seem to quote the original properly). I'm > sure I'll figure it out. Soon. > > > > Anyway, we monitor plenty of clients for whom we track the status of their > hosted sites in addition to their internal networks. For the hosted sites, > we simply create a host object with the hosted site's IP / DNS name and > assign checks normally (check_http variations primarily). > > > > - Brock > > > > *From:* [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] *On Behalf Of *August > Simonelli > *Sent:* Wednesday, January 23, 2008 6:23 PM > *To:* nagios-users@lists.sourceforge.net > *Subject:* [Nagios-users] how to monitor www.domain.com without host > object > > > > Hi Nagios-ers ... > > I need a little help with some logic here. > > In our network we have the usual set up: > > web servers -> VIP -> Cache -> VIP > > but then on top of the cache VIP we also use an external caching provider > (no prizes for guessing who that is, akamai) this means all requests for > www.mysite.com go to this external source via cname, which then gets > assigned a round-robin'ed IP. so it changes a lot. > > now, i want to monitor all kinds of page response times, error codes and > such that i know check_http can do ... > > and i can do that easily as a service definition for my web server host > objects, or my vip host object or my squid host objects etc. > > but ... and here's where i get confused ... > > i have no host objects for the external caches, so what IP do i do my > http_check tests against to ensure that i'm hitting our outermost layer as a > user would? > > put another way ... how would you all go about monitoring a website that > isn't yours (say you wanted to monitor cnn.com for all these things, what > ip would you run your checks against? can i create a host with a domain name > only? > > i'm sure this is easy and i'm just missing it ... so thanks for your > gentle help! :-) > > august > - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge
Re: [Nagios-users] how to monitor www.domain.com without host object
Sorry for the top post - I haven't quite figured out how to get Outlook 2007 to behave properly when replying to HTML emails (switching to plain text after I hit "Reply" doesn't seem to quote the original properly). I'm sure I'll figure it out. Soon. Anyway, we monitor plenty of clients for whom we track the status of their hosted sites in addition to their internal networks. For the hosted sites, we simply create a host object with the hosted site's IP / DNS name and assign checks normally (check_http variations primarily). - Brock From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of August Simonelli Sent: Wednesday, January 23, 2008 6:23 PM To: nagios-users@lists.sourceforge.net Subject: [Nagios-users] how to monitor www.domain.com without host object Hi Nagios-ers ... I need a little help with some logic here. In our network we have the usual set up: web servers -> VIP -> Cache -> VIP but then on top of the cache VIP we also use an external caching provider (no prizes for guessing who that is, akamai) this means all requests for www.mysite.com go to this external source via cname, which then gets assigned a round-robin'ed IP. so it changes a lot. now, i want to monitor all kinds of page response times, error codes and such that i know check_http can do ... and i can do that easily as a service definition for my web server host objects, or my vip host object or my squid host objects etc. but ... and here's where i get confused ... i have no host objects for the external caches, so what IP do i do my http_check tests against to ensure that i'm hitting our outermost layer as a user would? put another way ... how would you all go about monitoring a website that isn't yours (say you wanted to monitor cnn.com for all these things, what ip would you run your checks against? can i create a host with a domain name only? i'm sure this is easy and i'm just missing it ... so thanks for your gentle help! :-) august - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] how to monitor www.domain.com without host object
Hi August! On Thu, 24 Jan 2008, August Simonelli wrote: > i have no host objects for the external caches, so what IP do i do my > http_check tests against to ensure that i'm hitting our outermost layer as a > user would? Use the DNS name instead of IP. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] how to monitor www.domain.com without host object
Hi Nagios-ers ... I need a little help with some logic here. In our network we have the usual set up: web servers -> VIP -> Cache -> VIP but then on top of the cache VIP we also use an external caching provider (no prizes for guessing who that is, akamai) this means all requests for www.mysite.com go to this external source via cname, which then gets assigned a round-robin'ed IP. so it changes a lot. now, i want to monitor all kinds of page response times, error codes and such that i know check_http can do ... and i can do that easily as a service definition for my web server host objects, or my vip host object or my squid host objects etc. but ... and here's where i get confused ... i have no host objects for the external caches, so what IP do i do my http_check tests against to ensure that i'm hitting our outermost layer as a user would? put another way ... how would you all go about monitoring a website that isn't yours (say you wanted to monitor cnn.com for all these things, what ip would you run your checks against? can i create a host with a domain name only? i'm sure this is easy and i'm just missing it ... so thanks for your gentle help! :-) august - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Problem with Send_NSCA on Windows
Actually C# Does have echo, try System.Console.WriteLine("ECHO TO STANDARD IO"); you can also write to standard error and you can also redirect IO streams, C# give pleanty of ways for doing this, since it is a full development language and the Dot NEt Framework offers pleanty of classes, Go to MSDN and read throught the Library. particullary the IO,Console, and posibly the Process class depending on how you want to accomplish things. Using C# NC_Net can feed an IO into Win32_Send_NSCA.exe I also wrote my own version of SendNSCA in C# (internally in NC_NEt) doing that is a bit too complicated to discuss, but to oversimpify things: To reimplement SendNSCA just convert the Send_nsca.c into C# FOr commiunicating with Win32SEnd_Nsca read up on running processes Asyncronous and Syncronously. (spelling may be off) Have you tried using NC_NEt it provides both Active and Passive checks in a single windows plugin client It also has the ability to run other Scripts loaded into its script folder. IT is availible on sourceforge: http://sourceforge.net/projects/nc-net TOny (Author of NC_Net) On Jan 23, 2008 8:13 AM, <[EMAIL PROTECTED]> wrote: > > Hi, > > I am trying to monitor windows machines passively. > For the same, I am writing some code in C#. > > The problem is, C# does not support anything like echo command(The way we > used to do it on Linux). > I have tried to redirect the output from a file to the send_nsca exe, but > to no avail. > > Can you suggest some formats in which the information can be passed to the > send_nsca exe ? > > Thanks > Ankit > > =-=-= > Notice: The information contained in this e-mail > message and/or attachments to it may contain > confidential or privileged information. If you are > not the intended recipient, any dissemination, use, > review, distribution, printing or copying of the > information contained in this e-mail message > and/or attachments to it are strictly prohibited. If > you have received this communication in error, > please notify us by reply e-mail or telephone and > immediately and permanently delete the message > and any attachments. Thank you > > > > > - > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ > ___ > Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users > ::: Please include Nagios version, plugin version (-v) and OS when > reporting any issue. > ::: Messages without supporting info will risk being sent to /dev/null > - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] flap_detection_enabled persistence acrossreload/restart?
> -Original Message- > From: [EMAIL PROTECTED] [mailto:nagios-users- > [EMAIL PROTECTED] On Behalf Of Tom Throckmorton > Sent: Wednesday, January 23, 2008 4:16 PM > To: nagios-users@lists.sourceforge.net > Subject: [Nagios-users] flap_detection_enabled persistence > acrossreload/restart? > > Nagios 2.10, CentOS 5 x86_64 / i386, NDOUtils 1.4b6 > > Hi all, > > I've noticed something odd wrt flapping, and am wondering if I'm > overlooking > something simple, or just misunderstanding the way flapping and state > retention > are supposed to work. > [chop] > Before I dig further, can anyone verify that the state of host or service > flap > detection (enabled/disabled) should or shouldn't be persistent across a > reload/restart? I've combed the docs and archives, and am coming up dry. The retention file should take precedence. Not all directives can be overridden by the retention file but flap_detection_enabled is one of them (http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#service). Your configuration snippets look accurate, assuming they're applied as you indicate. -- marc - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] flap_detection_enabled persistence across reload/restart?
Nagios 2.10, CentOS 5 x86_64 / i386, NDOUtils 1.4b6 Hi all, I've noticed something odd wrt flapping, and am wondering if I'm overlooking something simple, or just misunderstanding the way flapping and state retention are supposed to work. First, just to verify, my main nagios config has: enable_flap_detection=1 retain_state_information=1 state_retention_file=/var/log/nagios/retention.dat retention_update_interval=<1,5,60 or even 0, doesn't matter> use_retained_program_state=1 use_retained_scheduling_info=1 In my global host and service templates that all hosts use, I have: flap_detection_enabled 1 retain_status_information 1 retain_nonstatus_information1 I've also disabled flap detection explicitly for a few hosts, and it all works as advertised. However, for any host/service, if I manually disable/enable flap detection via an external command / cgi, and then reload or restart, the option reverts to whatever is in the config for that given host/service. This happens regardless of whether 1) the option is being set in retention.dat, which it is, 2) the NDO-fed database thinks flapping for this host/service is disabled, or 3) w/out the broker_module enabled. Other state options are being preserved (such as active_checks_enabled) both at retention_update_interval and on a reload. So, what I think I'm seeing then is that during a reload, the flap_detection_enabled option isn't getting read from the retention file at program start, though I'd expect it to be persistent just as the other options are. FWIW, same behavior on earlier Nagios 2.x releases, but 1.x seems to do the right thing. Before I dig further, can anyone verify that the state of host or service flap detection (enabled/disabled) should or shouldn't be persistent across a reload/restart? I've combed the docs and archives, and am coming up dry. Thanks, -tt -- Tom Throckmorton OIT - CSI Duke University - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] check_http returning success full results on a urlwhich is down
> -Original Message- > From: [EMAIL PROTECTED] [mailto:nagios-users- > [EMAIL PROTECTED] On Behalf Of Darren McMillan > Sent: Wednesday, January 23, 2008 10:51 AM > To: nagios-users@lists.sourceforge.net > Subject: [Nagios-users] check_http returning success full results on a > urlwhich is down > > Hi All, > > I'm currently running Nagios 3.0 on a Fedora 7 box, with the latest plug- > in package. > > I'm trying to configure the check_http plug-in to check a test harness > running on a Windows box which can be accessed via a web interface. The > problem is that I have brought the test harness down, so that when you > manually connect to it via a browser (http://hostname:2000/test/results) > it will return a page cannot be displayed error as expected. However the > check_http is still responding with a success "HTTP OK HTTP/1.1 200 OK - > 5029 bytes in 0.004 seconds". > > define command{ > command_namecheck_http > command_line$USER1$/check_http -H $HOSTADDRESS$ -p $ARG1$ -u > $ARG2$ > } > > I have set this as a service in the windows.cfg as follows > > define service{ > use generic-service > host_name PONGO > service_description HTTP > check_command check_http!pongo!2000!/test/results > notifications_enabled 0 > } This should be failing loudly. It can't be what nagios is actually using. The command being executed by nagios would be -- /path/to/plugins/check_http -H -p pongo -u 2000 $ ./check_http -H 172.27.0.101 -p pongo -u 2000 check_http: Invalid port number - pongo > Can anyone spot why this is not failing even though I've closed the URL > it's trying to access? It's getting a 200 (successful) response code from your webserver. You're not testing what you think you're testing. Check your web server logs to see what nagios really is checking. You might also be interested in the -s option to verify output from your webserver. -- Marc - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Problem with high latencies after going distributed
> -Original Message- > From: [EMAIL PROTECTED] [mailto:nagios-users- > [EMAIL PROTECTED] On Behalf Of Frost, Mark {PBG} > Sent: Tuesday, January 22, 2008 10:34 AM > To: Nagios Users > Subject: [Nagios-users] Problem with high latencies after going > distributed > > > > As I'd mentioned in a previous message, I'm in the process of converting > from a centralized > Nagios 2.10 setup all running on a single host to a distributed setup > running on at least 3 > hosts (3 to start anyway). The centralized setup has 572 hosts and 2900 > services 99.9% of which are active checks. > Not quite to that level here but probably comparable. I'm submitting ~1200 service checks every 5 minutes from my 'largest' remote Nagios to two central boxen receiving a total of 3790 passive checks each every 5 minutes (for redundancy). > Distributed Node 1(min/max/avg) > Active Service Latency: 0.000 / 7267.198 / > 4241.019 sec > Active Service Execution Time:0.000 / 60.014 / 0.651 sec > > Distributed Node 2(min/max/avg) > Active Service Latency: 0.000 / 11475.901 / > 6393.641 sec > Active Service Execution Time:0.000 / 60.018 / 0.593 sec > > Wow. How many services are being polled/sent on each collector? My comparable stats for the collector above are -- Active Service Latency: 0.001 / 10.390 / 2.385 sec Active Service Execution Time:0.089 / 47.674 / 1.274 sec This isn't even a dedicated nagios box. It's also doing Cricket data collection for 12831 rrd files at 5 minute intervals and other stuff. My opinion is that unless there is some magic threshold that I haven't crossed (I don't expect that there is), your numbers indicate some network or configuration problem. Others have indicated that the OCSP execution may be an issue. Your OCSP command should execute _very_ quickly so I don't see how it's a significant factor at your levels unless there's a problem there, especially when spreading out 2900 checks over 15 minutes. That's about 3 checks per second versus my 4 per second. For me to send results to _2_ central boxes takes an insignificant amount of time -- $ time ./submit_check_result test test OK test 1 data packet(s) sent to host successfully. 1 data packet(s) sent to host successfully. real0m0.010s user0m0.000s sys 0m0.010s Even taking into account nagios setting up the call to submit_check_result it's still trivial. Just making you aware that this is testable by you and may be a red-herring. -- Marc - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] check_hparray hpacucli w/ sudo on debian/win2k (WAS: Re: Plugin help)
I'm running Debian on VMWare. Which is running on an ESX server. I want to remotely check the RAID arrays. I don't have a preference on how I do it as long as I can do it. The easier the better. It sounds like I'm going about it the wrong way. Any suggestions? Thanks for the reply! "Brian A. Seklecki" <[EMAIL PROTECTED]> wrote: First of all, let's set a real topic that will get people's attentions Second, you mention wanting to check win2k RAID array status, but you also mention VMWare and Debian. Are you running Debian in a VMWare guest VM? What OS is the Hypervisor running? Do you want to _remotely_ check win2k HP raid arrays? As far as debian goes, you will only be able to run Debian as the Hypervisor OS and check the HP RAID array of the hypervisor _locally_. You want to check HP raid array using hpacucli? I imagine this is one of the black magic binaries like Dell / AMI / LSI Logic megacli/megarc that will only work with special kernel hacks and modules, and of course, proper sudo permissions. ~BAS On Mon, 2008-01-14 at 14:58 -0800, Steve Amat wrote: > Hi all, > I need some help installing plugins for monitoring HP arrays. I'm a > Linux/nagios newbie so please bear with me. > > I'm using nagios on vmware (Debian OS). When I try and use some HP > monitoring plugins I have been getting permissions errors. I haven't > been able to set my permissions correctly to fix the problem. One of > the plugins states that the sudoers file needs to be edited so that > hpacucli has admin permissions. I don't have that file and even when > I create it the plugin still doesn't work. Here's the error: > "/usr/local/nagios/libexec/check_hparray > Usage: check_hparray -s Usage: check_hparray [-h | --help] Usage: > check_hparray [-V | --version] NOTE: HPACUCLI needs administrator > rights. add this line to /etc/sudoers nagios > ALL=NOPASSWD: /usr/sbin/hpacucli" > > The plugin instructions also state: "In your nrpe.cfg add for > example: > command[check_hpraid_slot1]=/opt/nrpe/libexec/check_hparray -s 1 > command[check_hpraid_slot2]=/opt/nrpe/libexec/check_hparray -s 2 > Will be look something like this in Nagios Status information: > ---snipp--- > RAID OK - (Smart Array P400 in Slot 1 array A logicaldrive 1 (68.3 GB, > RAID 1+0, OK) array B logicaldrive 2 (68.3 GB, RAID 1+0, OK)) > ---snipp---" > I haven't messed with this so maybe that is also part of the issue. > > Here's the plugin that I've been trying to use. > http://www.nagiosexchange.org/RAID_Controller.58.0.html?&tx_netnagext_pi1[p_view]=961&tx_netnagext_pi1[page]=10%3A10 > (Although I've tried all the ones that say HP on them from this site). > > I think I have hpacucli successfully installed but I'm not so sure > since plugin still won't work. > Can anyone suggest a good HP plugin or some things that I can try to > get the ones I have to work? I'm trying to monitor Windows servers. > Mainly dl360, 370 and 380's. > > Thanks for your help! > Steve > > > __ > Looking for last minute shopping deals? Find them fast with Yahoo! > Search. > > > > - > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > ___ Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include > Nagios version, plugin version (-v) and OS when reporting any issue. ::: > Messages without supporting info will risk being sent to /dev/null - Never miss a thing. Make Yahoo your homepage.- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] Service dependency not working
Hi, I've configured a dependency for multiple services, due to high link utilization on a circuit. The link utilization service is called "Site B Primary Traffic" on host "SITEB". In this example, I would expect notifications for "Ping" on Host "DEPENDENTHOST1" to be suppressed if "Site B Primary Traffic" on host "SITEB" is in an unknown or critical state. define servicedependency{ dependent_host_name DEPENDENTHOST1 host_name SITEB dependent_service_description Ping service_description Site B Primary Traffic execution_failure_criteria u,c notification_failure_criteria u,c } Unfortunately, this is not the case. I have just receieved a group of messages which contradict the configuration. Please assist! Thanks, John - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] Memory and fork problem with Nagios 2.9
Hi list, I'm quit new to Nagios, and I would know if someone can help me. This is my enviroment: - VMWare Virtual machine running over Microsoft Windows [Version 5.2.3790] with 2 GB RAM - Red Hat Enterprise Linux Server release 5 (Tikanga) installed on the VM - NAGIOS 2.9 with embedded perl - NET-SNMP I'm testing this enviroment to monitor some network devices using snmp plugins (I wasn't able to run the plugins without embedded perl). At the moment I'm monitoring 17 hosts (Routers, switches and 1 firewall) and 70 services (especially ports on routers with "check_ifstatus" plugin). My problem is that all the time that I start Nagios, very slowly, memory used by Nagios goes up (And I see that memory used by nagios childs to execute plugins is the same as the parent process) until I begin to find in nagios.log the message: "Warning: The check of service 'xxx' on host 'yyy' could not be performed due to a fork() error. The check will be rescheduled.". If I restart Nagios the situations is always the same (It takes a couple of days to arrive to the critical state) First I though about a problem with Nagios configuration but after some tuning I'm quite sure that the configuration is ok (No problem with user configuration or "service_reaper_frequency"). I read a post that was talking about known memory leak problems with embedded perl, could anyone explain to me a little bit better the problem? Is there any workaround or patch? Thankyou very much for the help - stefano ghelfi (Stiuz) --- The mailing list archive is found here: http://www.nagiosexchange.org/nagios-users.34.0.html - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] check_http returning success full results on a url which is down
Hi All, Im currently running Nagios 3.0 on a Fedora 7 box, with the latest plug-in package. Im trying to configure the check_http plug-in to check a test harness running on a Windows box which can be accessed via a web interface. The problem is that I have brought the test harness down, so that when you manually connect to it via a browser (http://hostname:2000/test/results) it will return a page cannot be displayed error as expected. However the check_http is still responding with a success HTTP OK HTTP/1.1 200 OK - 5029 bytes in 0.004 seconds. I have set check_http as follows in my commands.cfg file define command{ command_namecheck_http command_line$USER1$/check_http -H $HOSTADDRESS$ -p $ARG1$ -u $ARG2$ } I have set this as a service in the windows.cfg as follows define service{ use generic-service host_name PONGO service_description HTTP check_command check_http!pongo!2000!/test/results notifications_enabled 0 } I done the usall pre-flight check & reboot after changes. Can anyone spot why this is not failing even though Ive closed the URL its trying to access? Thanks, Darren. - Sent from Yahoo! - a smarter inbox.- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Determining the success or failure of external commands
A recurring flexible downtime is the solution I am currently using. However, my requirements have changed because certain tasks are not scheduled by time, but are instead triggered by other factors. So simply setting a recurring downtime window, or blacking out certain hours from the notification period is not an ideal solution. I would like to place the responsibility of suppressing alerts on the script that disrupts the service, instead of on a cron job or any other external system. On 1/23/08, Aaron M. Segura <[EMAIL PROTECTED]> wrote: > > Can't you set flexible recurring downtime to solve this? > > Ie: If the MySQL Database goes down between Midnight and 4am, start a > downtime window that last for 1 hour. If the DB is still down after an > hour, send an alert. > > I wrote a PHP script you can use in cron to schedule such a downtime > event: > > > http://www.nagiosexchange.org/Downtimes.38.0.html?&tx_netnagext_pi1[p_view]=628 > http://nagios.sourceforge.net/docs/2_0/downtime.html > > > On Wed, 2008-01-23 at 09:38 -0500, Scott Sanders wrote: > > In my case, a backup job might take down a MySQL database for anywhere > > from 1 minute to 1 hour, depending on the size of the database. > > Because the time needed to perform the backup is flexible and the time > > when the backup might occur is not always known, I cannot simply set > > the affected services to only notify in a timeperiod that excludes > > certain hours of the days. This is just an example of why I need to > > allow scripts and applications not on the nagios host(s) to be able to > > use the external command pipe. > > > > Currently I have a very simple API over https that uses the same auth > > mechanism as the Nagios frontend, and PHP classes that I can use in my > > client side scripts to manipulate this API. I am able to query Nagios > > about object data and status data, as well as submit commands to the > > nagios.cmd pipe. In order for the external command functionality to > > work the way I intend, I need to obtain a response from nagios so my > > server can respond back to the client with the results of processing > > the external command. I am really hoping there is an easy way to do > > this, as replacing the nagios.cmd file with something besides a FIFO > > pipe requires modification to the nagios source and is something I was > > trying to avoid. > > > > Thanks for the response. I hope this makes sense. > > > > -Scott > > > > On 1/23/08, Andreas Ericsson <[EMAIL PROTECTED]> wrote: > > Scott Sanders wrote: > > > Hi, > > > > > > I am working on implementing some functionality that will > > allow me to safely > > > expose nagios.cmd to external hosts. In my environment there > > are maintenance > > > tasks that run periodically which disrupt certain services, > > causing nagios > > > to start generating alerts. Needless to say, I am tired of > > having my cell > > > phone go crazy when this happens. > > > > In that case, why not ask "How do I keep my cellphone from > > waking me up?"? > > Instead, you've thought up a solution to your problem, which > > generates > > other problems, and now you want help solving those other > > problems. > > > > Assuming you know when these disruptive tasks are run, you > > should simply > > create a notification_period that doesn't include the > > sensitive hours > > and use that notification_period for the services being > > disrupted. > > > > There are other solutions too, but this one is normally the > > recommended, > > so I suggest you try that out first. > > > > -- > > Andreas Ericsson [EMAIL PROTECTED] > > OP5 AB www.op5.se > > Tel: +46 8-230225 Fax: +46 8-230231 > > > > > - > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ > > ___ Nagios-users mailing > list Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please > include Nagios version, plugin version (-v) and OS when reporting any issue. > ::: Messages without supporting info will risk being sent to /dev/null > - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) a
Re: [Nagios-users] Problem with high latencies after going distributed
>-Original Message- >From: Thomas Guyot-Sionnest [mailto:[EMAIL PROTECTED] >Sent: Tuesday, January 22, 2008 10:29 PM >To: Frost, Mark {PBG} >Cc: Nagios Users >Subject: Re: [Nagios-users] Problem with high latencies after >going distributed > >-BEGIN PGP SIGNED MESSAGE- >Hash: SHA1 > >On 22/01/08 09:13 PM, Frost, Mark {PBG} wrote: >> >> >>> -Original Message- >>> From: Steve Shipway [mailto:[EMAIL PROTECTED] >>> Sent: Tuesday, January 22, 2008 8:45 PM >>> To: Frost, Mark {PBG}; Nagios Users >>> Subject: RE: [Nagios-users] Problem with high latencies after >>> going distributed >>> >>> We've just done exactly the same (Nagios 2.9), and we have >a comparable >>> size of system (actually a bit larger - 713 hosts, 5834 services). >>> After going distributed, we too have this insanely high >latency on the >>> satellites. >>> >>> The only possible cause is the OCSP command slowing things >>> down somehow. >>> This is using the supplied send_nsca call to send the >status off to the >>> central server... >>> >>> define command { >>>command_namerelay >>>command_line$USER1$/submit_check_result "$HOSTNAME$" >>> "$SERVICEDESC$" "$SERVICESTATEID$" "$SERVICEOUTPUT$" >>> } >>> >>> So it should work. I guess things would be better if it >packaged the >>> updates up into batches, although it cant do that normally. >>> >>> I think it might be better to make the OCSP command just dump >>> the status >>> to a file, and then have a cronjob every 60 seconds that >reads the file >>> and sends the statuses off as a batch. I will try this here, >>> when I get >>> the chance. >>> >>> Steve >> >> >> But if the submit_check_result is running slowly, that would >only affect >> the service >> execution time wouldn't it? My understanding of check >latency is that >> it's the difference >> in time between when Nagios schedules a check to run versus the time >> that the check >> actually starts to execute. > >You're right, but you're just missing one detail. Nagios runs checks in >parallel and then reaps all the service results at once. While it's >reaping it can't schedule other checks and it is in the reaping state >that Nagios runs host check, event handlers, performance data commands >and oc[hs]p commands. All this is done serially and can slow down >significantly each service reaping run and thus delay the execution of >further checks. > >I although I never built a distributed system, I designed mine to be >easily distributed. Moreover, I used a technique I developed for >latency-free performance-data processing (That I still heavily use BTW) >to create a way to distribute check results to to a distributed central >server in the same latency-free way (Was more like a fun project as I >don't use it myself yet). > >Basically you use the host/service performance data files to get the >data, but instead of writing to a file you write it to a named pipe >(fifo). That pipe is then read by a high-performance non-blocking >event-based Perl daemon (yeah I know that looks like marketing terms, >but I can explain further each of them if you like) that forks >send_nsca >processes to send results in bulk (normally every few seconds though). > >So Nagios doesn't even loose time rotating a file and all your checks >are transmitted almost instantly. See this wiki page for >details and code: > >http://www.nagioscommunity.org/wiki/index.php/OCP_Daemon > > >Thomas Interesting. Thanks for the explanation. If I understand this right, the reason I don't see this issue on my old non-distributed system is that when the reaping occurs there, it does not involve running oc[sh]p command which lops off a good chunk of time for the reaping process to complete. On the distributed node, the reaping takes so long that it affects Nagios' scheduling and actual check execution times and thereby affects latencies. This seems like a serious impediment to normal functioning of a distributed Nagios setup. That is, in order to make all but the smallest distributed node setups work you have to come up with this roll-your-own setup. I haven't read the "new in Nagios 3" doc in a while. Is this something that is fixed in some way there? Thanks Mark - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Determining the success or failure of external commands
Can't you set flexible recurring downtime to solve this? Ie: If the MySQL Database goes down between Midnight and 4am, start a downtime window that last for 1 hour. If the DB is still down after an hour, send an alert. I wrote a PHP script you can use in cron to schedule such a downtime event: http://www.nagiosexchange.org/Downtimes.38.0.html?&tx_netnagext_pi1[p_view]=628 http://nagios.sourceforge.net/docs/2_0/downtime.html On Wed, 2008-01-23 at 09:38 -0500, Scott Sanders wrote: > In my case, a backup job might take down a MySQL database for anywhere > from 1 minute to 1 hour, depending on the size of the database. > Because the time needed to perform the backup is flexible and the time > when the backup might occur is not always known, I cannot simply set > the affected services to only notify in a timeperiod that excludes > certain hours of the days. This is just an example of why I need to > allow scripts and applications not on the nagios host(s) to be able to > use the external command pipe. > > Currently I have a very simple API over https that uses the same auth > mechanism as the Nagios frontend, and PHP classes that I can use in my > client side scripts to manipulate this API. I am able to query Nagios > about object data and status data, as well as submit commands to the > nagios.cmd pipe. In order for the external command functionality to > work the way I intend, I need to obtain a response from nagios so my > server can respond back to the client with the results of processing > the external command. I am really hoping there is an easy way to do > this, as replacing the nagios.cmd file with something besides a FIFO > pipe requires modification to the nagios source and is something I was > trying to avoid. > > Thanks for the response. I hope this makes sense. > > -Scott > > On 1/23/08, Andreas Ericsson <[EMAIL PROTECTED]> wrote: > Scott Sanders wrote: > > Hi, > > > > I am working on implementing some functionality that will > allow me to safely > > expose nagios.cmd to external hosts. In my environment there > are maintenance > > tasks that run periodically which disrupt certain services, > causing nagios > > to start generating alerts. Needless to say, I am tired of > having my cell > > phone go crazy when this happens. > > In that case, why not ask "How do I keep my cellphone from > waking me up?"? > Instead, you've thought up a solution to your problem, which > generates > other problems, and now you want help solving those other > problems. > > Assuming you know when these disruptive tasks are run, you > should simply > create a notification_period that doesn't include the > sensitive hours > and use that notification_period for the services being > disrupted. > > There are other solutions too, but this one is normally the > recommended, > so I suggest you try that out first. > > -- > Andreas Ericsson [EMAIL PROTECTED] > OP5 AB www.op5.se > Tel: +46 8-230225 Fax: +46 8-230231 > > - > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ > ___ Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include > Nagios version, plugin version (-v) and OS when reporting any issue. ::: > Messages without supporting info will risk being sent to /dev/null - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Determining the success or failure of external commands
Kyle, Yes, I have been following the thread you linked and saw some of the suggestions made. However, all of them seem "hackish" to me. Using NFS is not a good solution for me, because it reduces the portability of my scripts. For example, if a server that runs processes which disrupt monitored services cannot use NFS, I am out of luck. Also, simply exporting the nagios.cmd file over NFS requires me to use NFS to secure things instead of using the same authentication system nagios uses. I already have my API working, and am able to submit commands to nagios in a safe manner, but I cannot verify that those command were processed or what the result is. Consider the following block of code: $nag = new Nagios('username', 'password', 'nagios.domain.com'); $host = $nag->findHostByIP('192.168.1.1'); $result = $nag->scheduleHostDowntime($host->name, date(U), date(U)+3600, true, 0, 3600, $nag->getUsername(), 'Auto-scheduled downtime for X'); if($result->code == 0) { do_task_that_causes_downtime(); } else { log_errors($result->message); } This is what I envision being able to do. One of the main problems is that nagios may take a while to process the command, so if the command is sent and recieved by nagios, but hasn't yet been processed when the disruptive task begins, alerts will be still be generated. While typing this I received Marc's reply and it seems I will need to modify commands.c to log when a command was processed then add a facility in my client interface to poll nagios about the status of a command in the pipe. This way my client can sit and wait until the command is processed before beginning the disruptive task. I believe I have a better understanding of what I need to do now. Thanks for all the advice and I look forward to any additional feedback. -Scott SCHEDULE_HOST_DOWNTIME On 1/23/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi Scott, > > I'm in the process of doing something similar. I've come up with > something that may help you. > > Read my thread entitle "nagios.cmd over nfs" > > > http://www.nagiosexchange.org/nagios-users.34.0.html?&tx_maillisttofaq_pi1[mode]=1&tx_maillisttofaq_pi1[showUid]=8571 > > > If nfs isn't an option, Thomas mentioned the use of netcat and or a > Perl daemon which would offer more control. > > Good luck! > On 1/23/08, Scott Sanders <[EMAIL PROTECTED]> wrote: > > In my case, a backup job might take down a MySQL database for anywhere > from > > 1 minute to 1 hour, depending on the size of the database. Because the > time > > needed to perform the backup is flexible and the time when the backup > might > > occur is not always known, I cannot simply set the affected services to > only > > notify in a timeperiod that excludes certain hours of the days. This is > just > > an example of why I need to allow scripts and applications not on the > nagios > > host(s) to be able to use the external command pipe. > > > > Currently I have a very simple API over https that uses the same auth > > mechanism as the Nagios frontend, and PHP classes that I can use in my > > client side scripts to manipulate this API. I am able to query Nagios > about > > object data and status data, as well as submit commands to the > > nagios.cmdpipe. In order for the external command functionality to > > work the way I > > intend, I need to obtain a response from nagios so my server can respond > > back to the client with the results of processing the external command. > I am > > really hoping there is an easy way to do this, as replacing the > > nagios.cmdfile with something besides a FIFO pipe requires > > modification to the nagios > > source and is something I was trying to avoid. > > > > Thanks for the response. I hope this makes sense. > > > > -Scott > > > > On 1/23/08, Andreas Ericsson <[EMAIL PROTECTED]> wrote: > > > > > > Scott Sanders wrote: > > > > Hi, > > > > > > > > I am working on implementing some functionality that will allow me > to > > > safely > > > > expose nagios.cmd to external hosts. In my environment there are > > > maintenance > > > > tasks that run periodically which disrupt certain services, causing > > > nagios > > > > to start generating alerts. Needless to say, I am tired of having my > > > cell > > > > phone go crazy when this happens. > > > > > > In that case, why not ask "How do I keep my cellphone from waking me > up?"? > > > Instead, you've thought up a solution to your problem, which generates > > > other problems, and now you want help solving those other problems. > > > > > > Assuming you know when these disruptive tasks are run, you should > simply > > > create a notification_period that doesn't include the sensitive hours > > > and use that notification_period for the services being disrupted. > > > > > > There are other solutions too, but this one is normally the > recommended, > > > so I suggest you try that out first. > > > > > > -- > > > Andreas Ericsson [EMAIL PROTECTED] > > > OP5 AB
Re: [Nagios-users] NDO Troubles
On Jan 23 11:00, Giles Coochey wrote: > > > Have you tried the advice of someone else to give InnoDB loads of > memory? I would like to try that, but have no idea as to how to do it! > Perhaps someone can advise? Have a look at the sample mysql configs that come w/ the mysql-server package (/usr/share/doc/mysql-server-, on Red Hat and friends, at least). You could use/adapt one of the configs intended for larger environments, depending on your configuration. If nothing else, that's a good starting point. I'd also recommend checking out http://www.mysqlperformanceblog.com/, particularly the section on performance presentations. Good stuff. -tt -- Tom Throckmorton OIT - CSI Duke University - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Determining the success or failure of externalcommands
> -Original Message- > From: [EMAIL PROTECTED] [mailto:nagios-users- > [EMAIL PROTECTED] On Behalf Of Scott Sanders > Sent: Wednesday, January 23, 2008 8:39 AM > To: nagios-users@lists.sourceforge.net > Subject: Re: [Nagios-users] Determining the success or failure of > externalcommands > > nagios.cmd pipe. In order for the external command functionality to work > the way I intend, I need to obtain a response from nagios so my server can > respond back to the client with the results of processing the external > command. I am really hoping there is an easy way to do this, as replacing > the nagios.cmd file with something besides a FIFO pipe requires > modification to the nagios source and is something I was trying to avoid. Nagios was never designed to provide status back to a script submitting a command to the external command pipe because it is not a real-time operation and the commands should always succeed (why wouldn't they?). The command may not be read for quite some time after it's submitted, depending on what nagios is doing at the time. As for logging, Nagios assumes that all external commands succeed and logs nothing unless the command is malformed. There is additional logging that is available by running nagios in DEBUG3 but that still doesn't indicate success or failure. commands.c handles external commands. I'd suggest you start there and add in what additional logging you feel you need. -- Marc - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Determining the success or failure of external commands
Hi Scott, I'm in the process of doing something similar. I've come up with something that may help you. Read my thread entitle "nagios.cmd over nfs" http://www.nagiosexchange.org/nagios-users.34.0.html?&tx_maillisttofaq_pi1[mode]=1&tx_maillisttofaq_pi1[showUid]=8571 If nfs isn't an option, Thomas mentioned the use of netcat and or a Perl daemon which would offer more control. Good luck! On 1/23/08, Scott Sanders <[EMAIL PROTECTED]> wrote: > In my case, a backup job might take down a MySQL database for anywhere from > 1 minute to 1 hour, depending on the size of the database. Because the time > needed to perform the backup is flexible and the time when the backup might > occur is not always known, I cannot simply set the affected services to only > notify in a timeperiod that excludes certain hours of the days. This is just > an example of why I need to allow scripts and applications not on the nagios > host(s) to be able to use the external command pipe. > > Currently I have a very simple API over https that uses the same auth > mechanism as the Nagios frontend, and PHP classes that I can use in my > client side scripts to manipulate this API. I am able to query Nagios about > object data and status data, as well as submit commands to the > nagios.cmdpipe. In order for the external command functionality to > work the way I > intend, I need to obtain a response from nagios so my server can respond > back to the client with the results of processing the external command. I am > really hoping there is an easy way to do this, as replacing the > nagios.cmdfile with something besides a FIFO pipe requires > modification to the nagios > source and is something I was trying to avoid. > > Thanks for the response. I hope this makes sense. > > -Scott > > On 1/23/08, Andreas Ericsson <[EMAIL PROTECTED]> wrote: > > > > Scott Sanders wrote: > > > Hi, > > > > > > I am working on implementing some functionality that will allow me to > > safely > > > expose nagios.cmd to external hosts. In my environment there are > > maintenance > > > tasks that run periodically which disrupt certain services, causing > > nagios > > > to start generating alerts. Needless to say, I am tired of having my > > cell > > > phone go crazy when this happens. > > > > In that case, why not ask "How do I keep my cellphone from waking me up?"? > > Instead, you've thought up a solution to your problem, which generates > > other problems, and now you want help solving those other problems. > > > > Assuming you know when these disruptive tasks are run, you should simply > > create a notification_period that doesn't include the sensitive hours > > and use that notification_period for the services being disrupted. > > > > There are other solutions too, but this one is normally the recommended, > > so I suggest you try that out first. > > > > -- > > Andreas Ericsson [EMAIL PROTECTED] > > OP5 AB www.op5.se > > Tel: +46 8-230225 Fax: +46 8-230231 > > > - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Determining the success or failure of external commands
In my case, a backup job might take down a MySQL database for anywhere from 1 minute to 1 hour, depending on the size of the database. Because the time needed to perform the backup is flexible and the time when the backup might occur is not always known, I cannot simply set the affected services to only notify in a timeperiod that excludes certain hours of the days. This is just an example of why I need to allow scripts and applications not on the nagios host(s) to be able to use the external command pipe. Currently I have a very simple API over https that uses the same auth mechanism as the Nagios frontend, and PHP classes that I can use in my client side scripts to manipulate this API. I am able to query Nagios about object data and status data, as well as submit commands to the nagios.cmdpipe. In order for the external command functionality to work the way I intend, I need to obtain a response from nagios so my server can respond back to the client with the results of processing the external command. I am really hoping there is an easy way to do this, as replacing the nagios.cmdfile with something besides a FIFO pipe requires modification to the nagios source and is something I was trying to avoid. Thanks for the response. I hope this makes sense. -Scott On 1/23/08, Andreas Ericsson <[EMAIL PROTECTED]> wrote: > > Scott Sanders wrote: > > Hi, > > > > I am working on implementing some functionality that will allow me to > safely > > expose nagios.cmd to external hosts. In my environment there are > maintenance > > tasks that run periodically which disrupt certain services, causing > nagios > > to start generating alerts. Needless to say, I am tired of having my > cell > > phone go crazy when this happens. > > In that case, why not ask "How do I keep my cellphone from waking me up?"? > Instead, you've thought up a solution to your problem, which generates > other problems, and now you want help solving those other problems. > > Assuming you know when these disruptive tasks are run, you should simply > create a notification_period that doesn't include the sensitive hours > and use that notification_period for the services being disrupted. > > There are other solutions too, but this one is normally the recommended, > so I suggest you try that out first. > > -- > Andreas Ericsson [EMAIL PROTECTED] > OP5 AB www.op5.se > Tel: +46 8-230225 Fax: +46 8-230231 > - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] nagios.cmd over nfs
Thanks for the pointers. On 1/23/08, Thomas Guyot-Sionnest <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 23/01/08 08:12 AM, [EMAIL PROTECTED] wrote: > > Success! > > > > Web Server- > > cmd.c > > > > change: > > fopen(command_file,"w") > > to: > > fopen("/path/to/cgi.pipe","a") > > > > Nagios Server- > > > > edit nagios startup script to: > > > > start) > > touch /path/to/cgi.pipe > > tail -f /path/to/cgi.pipe > /path/to/nagios.cmd > > Truncate it first to avoid replaying old commands: > > start) > true >/path/to/cgi.pipe > tail -f /path/to/cgi.pipe > /path/to/nagios.cmd > > > stop) > > rm /path/to/cgi.pipe > > Useless as the file can be created by the cgi anyways... > > You should also monitor the size and make sure it doesn't grows up too much. > > Thomas > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.6 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFHl0At6dZ+Kt5BchYRAnTlAKDj9zBA9EFgOLoNrg1ZGylthdUsuQCggux+ > ZyzkpkjWOMsQjdsuQp3arNE= > =NAKF > -END PGP SIGNATURE- > - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] nagios.cmd over nfs
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 23/01/08 08:12 AM, [EMAIL PROTECTED] wrote: > Success! > > Web Server- > cmd.c > > change: > fopen(command_file,"w") > to: > fopen("/path/to/cgi.pipe","a") > > Nagios Server- > > edit nagios startup script to: > > start) > touch /path/to/cgi.pipe > tail -f /path/to/cgi.pipe > /path/to/nagios.cmd Truncate it first to avoid replaying old commands: start) true >/path/to/cgi.pipe tail -f /path/to/cgi.pipe > /path/to/nagios.cmd > stop) > rm /path/to/cgi.pipe Useless as the file can be created by the cgi anyways... You should also monitor the size and make sure it doesn't grows up too much. Thomas -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHl0At6dZ+Kt5BchYRAnTlAKDj9zBA9EFgOLoNrg1ZGylthdUsuQCggux+ ZyzkpkjWOMsQjdsuQp3arNE= =NAKF -END PGP SIGNATURE- - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] Problem with Send_NSCA on Windows
Hi, I am trying to monitor windows machines passively. For the same, I am writing some code in C#. The problem is, C# does not support anything like echo command(The way we used to do it on Linux). I have tried to redirect the output from a file to the send_nsca exe, but to no avail. Can you suggest some formats in which the information can be passed to the send_nsca exe ? Thanks Ankit =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] nagios.cmd over nfs
Success! Web Server- cmd.c change: fopen(command_file,"w") to: fopen("/path/to/cgi.pipe","a") Nagios Server- edit nagios startup script to: start) touch /path/to/cgi.pipe tail -f /path/to/cgi.pipe > /path/to/nagios.cmd stop) rm /path/to/cgi.pipe On 1/23/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I was thinking of changing the cgi.cgi source to write to an actual > file on the nfs mount, and then have tail -f nfswrittenfile.cmd-pipe > > /path/to/nagios.cmd > > On 1/22/08, Thomas Guyot-Sionnest <[EMAIL PROTECTED]> wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > On 22/01/08 03:38 PM, [EMAIL PROTECTED] wrote: > > > ... not so much > > > > > > It solves the web page spinning, but since nagios never picks up the > > > data nothing happens. > > > > Yep. As it was already said on the thread fifos only works locally. It > > implemented in the kernel, not in the FS code. The FS is only involved > > in giving it a name and permissions (and this trivial task is properly > > implemented by NFS: each server can use the pipe ... locally). > > > > A trivial (hacky) workaround could be using Netcat (nc): > > > > On the webserver: > > > > cat /path/to/nagios.cmd | nc > > > > On the Nagios server: > > > > nc -lp >/path/to/nagios.cmd > > > > Since NC can die you should ideally run in with Daniel J Bernstein's > > Daemontools: > > > > http://cr.yp.to/daemontools.html > > > > Also try in UDP mode (nc -u host post / nc -lup port) if you have > problems. > > > > > > The solution I'd go for though would be using Perl daemons for relaying > > the commands using code similar to these daemons: > > > > http://www.nagioscommunity.org/wiki/index.php/OCP_Daemon#OCP_daemon_code > > http://nagiosexchange.altinity.org/nagiosexchange/NPDaemon/ > > > > It requires good Perl knowledge, especially since these daemons doesn't > > include any non-blocking sending function. Since the command pipe isn't > > much solicited you can just go blocking too (while ()/blocking > > send on the web server, blocking listen/blocking write to the nagios > > server), but make sure you implement timeouts with alarm() in the > > network code to avoid jamming there. > > > > Thomas > > -BEGIN PGP SIGNATURE- > > Version: GnuPG v1.4.6 (GNU/Linux) > > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > > > iD8DBQFHlroF6dZ+Kt5BchYRAuhlAJ0SZ5RXPnXkRZGMHTaklNw8znQIVwCdHrah > > EqhmEozdq4qLNeM8W0Ip3l0= > > =BRMo > > -END PGP SIGNATURE- > > > - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] nagios.cmd over nfs
I was thinking of changing the cgi.cgi source to write to an actual file on the nfs mount, and then have tail -f nfswrittenfile.cmd-pipe > /path/to/nagios.cmd On 1/22/08, Thomas Guyot-Sionnest <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 22/01/08 03:38 PM, [EMAIL PROTECTED] wrote: > > ... not so much > > > > It solves the web page spinning, but since nagios never picks up the > > data nothing happens. > > Yep. As it was already said on the thread fifos only works locally. It > implemented in the kernel, not in the FS code. The FS is only involved > in giving it a name and permissions (and this trivial task is properly > implemented by NFS: each server can use the pipe ... locally). > > A trivial (hacky) workaround could be using Netcat (nc): > > On the webserver: > > cat /path/to/nagios.cmd | nc > > On the Nagios server: > > nc -lp >/path/to/nagios.cmd > > Since NC can die you should ideally run in with Daniel J Bernstein's > Daemontools: > > http://cr.yp.to/daemontools.html > > Also try in UDP mode (nc -u host post / nc -lup port) if you have problems. > > > The solution I'd go for though would be using Perl daemons for relaying > the commands using code similar to these daemons: > > http://www.nagioscommunity.org/wiki/index.php/OCP_Daemon#OCP_daemon_code > http://nagiosexchange.altinity.org/nagiosexchange/NPDaemon/ > > It requires good Perl knowledge, especially since these daemons doesn't > include any non-blocking sending function. Since the command pipe isn't > much solicited you can just go blocking too (while ()/blocking > send on the web server, blocking listen/blocking write to the nagios > server), but make sure you implement timeouts with alarm() in the > network code to avoid jamming there. > > Thomas > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.6 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFHlroF6dZ+Kt5BchYRAuhlAJ0SZ5RXPnXkRZGMHTaklNw8znQIVwCdHrah > EqhmEozdq4qLNeM8W0Ip3l0= > =BRMo > -END PGP SIGNATURE- > - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] custom notification script
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 23/01/08 05:49 AM, Rilawich Ango wrote: > Hi all, > In the templates.cfg, there is a notification command called > notify-host-by-email. Where to define that command? > How can I write my own command when there is a problem? > ango Look for files named "commands.cfg", "misccommands.cfg" or "checkcommands.cfg" or grep for "notify-" in your config directory. That command is defined by a "define command" definition. You can obviously change it and use custom scripts to send notifications. You should look at the documentation too so see which macros you can use: http://nagios.sourceforge.net/docs/2_0/macros.html Thomas -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHlzPc6dZ+Kt5BchYRAhKZAKCyabgF6ajCLwLD979CQzjgPukeBACgqG1X ogz1pGCQs2P4vsP0p9/BmLw= =h4b0 -END PGP SIGNATURE- - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] custom notification script
Hi all, In the templates.cfg, there is a notification command called notify-host-by-email. Where to define that command? How can I write my own command when there is a problem? ango - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] NDO Troubles
> > you just delete the database and ndodaemon back to work ? > I have to run the db installation script that comes with ndoutils to recreate the db schema. > if you use postgresql? same problem ?? Is postgresql support actually working? I found conflicting information as to whether it would work so I never tried it. Have you tried the advice of someone else to give InnoDB loads of memory? I would like to try that, but have no idea as to how to do it! Perhaps someone can advise? > (if i dont solve my problem with NDO tomorow my boss will abort nagios > in the company.. :-( ) > Tell him it's his loss if he takes that route :-). Note that ndoutils is beta software and I don't believe much effort will be taken to resolve this problem until Nagios v3 reaches stable, I have read comments that Ethan is well aware of this problem, and it requires work to not have ndo2db halt Nagios while it does its work. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Determining the success or failure of external commands
Scott Sanders wrote: > Hi, > > I am working on implementing some functionality that will allow me to safely > expose nagios.cmd to external hosts. In my environment there are maintenance > tasks that run periodically which disrupt certain services, causing nagios > to start generating alerts. Needless to say, I am tired of having my cell > phone go crazy when this happens. In that case, why not ask "How do I keep my cellphone from waking me up?"? Instead, you've thought up a solution to your problem, which generates other problems, and now you want help solving those other problems. Assuming you know when these disruptive tasks are run, you should simply create a notification_period that doesn't include the sensitive hours and use that notification_period for the services being disrupted. There are other solutions too, but this one is normally the recommended, so I suggest you try that out first. -- Andreas Ericsson [EMAIL PROTECTED] OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null