<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span></span></div><div><span>Dear All,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab">    </span><span class="tab">    Can you tell me how </span>i can use and see printer consumables status.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent;
 font-style: normal;"><span class="tab">    Please response as soon as possible..</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span class="tab"></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span class="tab"></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab">Thanks & Regards <br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span class="tab"></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new
 york,times,serif; background-color: transparent; font-style: normal;"><span class="tab">Bharat Varandani</span><br><span></span></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> Andreas Ericsson <ae@op5.se><br> <b><span style="font-weight: bold;">To:</span></b> Ton Voon <ton.voon@opsview.com> <br><b><span style="font-weight: bold;">Cc:</span></b> Nagios Developers List <nagios-devel@lists.sourceforge.net>; Nagios Users List <nagios-users@lists.sourceforge.net> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, August 8, 2013 7:52 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Nagios-users] [Nagios-devel] Patches for inclusion to Nagios 4<br> </font> </div>
 <div class="y_msg_container"><br>On 2013-08-08 15:17, Ton Voon wrote:<br>><br>> On 7 Aug 2013, at 08:51, Andreas Ericsson wrote:<br>><br>>> On 2013-08-06 19:16, Ton Voon wrote:<br>>>> Hi!<br>>>><br>>>> We've published a list of patches for Nagios 4:<br>>>> <a href="http://www.opsview.com/whats-new/blog/opsview-patches-nagios-4" target="_blank">http://www.opsview.com/whats-new/blog/opsview-patches-nagios-4</a><br>>>><br>>>> We'd be happy if you could review if these are acceptable for<br>>>> future inclusion or if anyone else finds them useful.<br>>>><br>>><br>>> I'd like to get patches with commit messages and proper author and<br>>> signed-off-by info. Since we're using git for Nagios now, it'd go a<br>>> long way in making sure everyone gets credit for the work they've<br>>> done.<br>>><br>>> The patches also need to apply
 cleanly to the latest master.<br>>><br>>> You may want to clone the official Nagios repo, apply your patches<br>>> on top of it and then send me a pull request for github or some<br>>> such.<br>>><br>>> git clone git://git.code.sf.net/p/nagios/nagios nagios-core<br>>><br>>> should get you the very latest. If you apply your patches on top<br>>> of 'master' and make sure to always do "git pull --rebase" when you<br>>> want to get the latest and greatest you'll quickly see which<br>>> patches either have been applied or which no longer *can* be<br>>> applied. Then you can create a separate repository on github or<br>>> some such and push the changes there.<br>><br>> OK, we'll convert them into git changes based off master.<br>> However....<br>><br>> I'd like an assurance that the changes will be merged before we<br>> promise to convert. Style changes are fine,
 won't take much time and<br>> will not require retesting, but if we need to refactor object changes<br>> or make larger changes to logic, this will require retesting on our<br>> side. I'd like a reassurance that the time invested will result in a<br>> merge upstream, otherwise we're just wasting time for all of us.<br>><br><br><br><br>> For instance, your assistance in the "environment macros per-command"<br>> was greatly appreciated and we've coded to the design agreed in the<br>> email conversations, but it hasn't been merged yet.<br>><br><br>It has, but it hasn't. The original patch no longer applies, due to<br>extensive remodeling of the worker code. I still have it hanging<br>around though, and I'm fairly inclined towards using it for services<br>and hosts as well, so that environment macros can be set on a service <br>level as well as on a command level. I've also been investigating the<br>chances of doing this without
 resorting to setenv() (in essence,<br>building a one-off block of the load-time environment macros, and then<br>extending that whenever we hit an environment variable).<br><br>But yea, I've got that one already.<br><br>> So I'd like to reverse the question and ask "which changes are most<br>> likely to be accepted, based on the amount of changes required" and<br>> we'll work through that list in order.<br>><br><br>Thread-safe calls<br>It's harmless, and I'd apply it straight away if I had a sensible<br>commit message for it, but I don't know why you need this so I can't<br>really write one. While we're on the topic; Please write commit<br>messages in imperative form and present tense, as if you're giving<br>orders to the code for how it should change. Also give a short<br>rationale for why it should change that way. The rules about not<br>commenting out code you want to get rid of still applies though. It<br>just looks terribly hackish when
 patches meant for upstream contains<br>things like that.<br><br><br>Slice services within hosts<br>So long as it's configurable from cgi.cfg and the default stays the<br>same as it is today I'll apply it immediately. It has no impact on<br>loadable modules or other headaches, so that's a nobrainer, really.<br><br><br>Check command by time period<br>I feel this is somewhat lacking in efficiency and flexibility, and<br>a much cleaner solution would be to add a filtering functionality to<br>NERD so that checkresults can be shipped off to a third-party addon<br>which can transform checkresults and plugin output as much as it<br>likes.<br>Failing that (which would be enormously cool but also a lot of work),<br>I think it would most likely be best off as a separate module, with<br>custom variables or separate configuration to support it. Supporting<br>patches to run events when a timeperiod becomes active or inactive<br>would still be welcome,
 obviously.<br><br><br>Escalation via notification levels<br>This is best off written as a module, using custom variables to <br>configure it. If core support is required to block notifications to a<br>particular contact, then such patches will naturally be accepted. The<br>normal NEBCALLBACK_CANCEL return code signalling should work just fine<br>for that.<br><br><br>Synchronising state data<br>Pretty invasive for quite a small benefit, and with enormous<br>complexities to deal with to make this work properly. How do you<br>handle reading the synced file while checks are in-flight and<br>awaiting being returned to the mothership? They may have been<br>spawned as a result of a bad checkresult on one node, but if the<br>sync status returns them to OK and the in-flight result sets them<br>as bad again, would that mean starting over on the retry-attempts?<br>I see nothing in the patch that handles situations like that, so<br>I'm forced to believe you haven't
 considered it. Considering the<br>fact that full reloads now take less than a second for your<br>recommended 250 hosts per system, I'm inclined to drop this patch<br>in favour of the regular retention data file unless you can<br>persuade me otherwise.<br><br><br>Dependency failure states<br>The patch is a bit hackish in that it internally submits a passive<br>check to make sure everything gets updated. That's not entirely<br>accurate though, and will cause statistical errors.<br>Rewrite it to just update the states as necessary and make sure<br>notifications and whatnot are sent if they should be.<br>That will also fix the problem of bugging out performance data<br>handling routines that expect to always get the same kind of data<br>from each check every time.<br>It will have to be configurable though. I'm thinking<br>"service_dependency_exec_fail_state=(warning,critical,unknown)"<br>and "service_dependency_exec_fail_output=Dependency failure".<br>I'd
 be all for changing the default, but for now the exec_fail_state<br>thing will have to be -1, meaning "leave it as-is", and I'll make<br>it default to UNKNOWN after 4.0 is released.<br>The same should go for service parents, btw.<br><br><br>Passive notifications respecting renotification interval<br>I'm inclined to making this default. It's not documented anywhere<br>which of those options take precedence. If notification_interval<br>is 0, then every notification should be sent for is_volatile<br>services, and if it's anything else we should respect the interval<br>no matter how many notifications happen to arrive. Make those<br>changes and I'll apply the patch and call it a bugfix.<br><br><br>Reducing SQL queries part 1:<br>No. Just no. This is a perfect place where you can use an array sized<br>after num_objects.services *inside the module* and look up the latest<br>version of the processed commandline there. Free it when you update it<br>and you'll
 be sure to always have it handy. Anyone who doesn't use<br>NDOUtils will otherwise be penalized for its shortcomings.<br><br><br>Reducing SQL queries part 2:<br>As above, but num_objects.hosts<br><br><br>Conditional debugging:<br>I'm more inclined towards making the debug-logging function a C99-style<br>variadic macro (or a gcc style one), while falling back to using the<br>current structure of a lot of unnecessary calls on too old compilers.<br>All that iffing should really be kept at arms length from the coder,<br>or debug-logging won't be used. I'm thinking<br>   dbg(DEBUGL_CHECKS, 0, "** Running async check of foo ... ");<br><br>so we get it short and sweet while we're at it.<br><br><br>FIFO processing of passive checkresults<br>I have several objections to this patch.<br>First off; You're sorting on alphanumerical name only, instead of mtime<br>first and then name in case of a tiebreak. That's just plain dumb and<br>has to be amended if this
 is to be anywhere near useful.<br>Secondly; This doesn't scale. I spent the better part of last year<br>removing everything that touches the filesystem on a scheduled and<br>frequent basis for those precise reasons. Putting crap like that back in<br>is not something I'll do without a very good reason.<br>Thirdly; It builds on obsolete code which is designated for oblivion,<br>so the code would be (relatively) shortlived anyway.<br>Fourthly; *Nothing* can be built on top of such a patch that doesn't<br>absolutely reek of hackishness and bad design.<br>A much more useful patch would be adding support for external commands<br>to the query handler, which doesn't have the limitations of the named<br>pipe (and can give responses to your requests so you know if they were<br>accepted or not) and use a secondary program to ship in passive results<br>any old way you want to the clean, nice and responsive interface which<br>is meant to be extended for things
 exactly like this.<br><br><br>Tolerant time jumps<br>I'm unsure how useful this is. How often does a system clock go<br>backwards except for daylight savings time? I also worry slightly<br>about the consequences. OTOH, most of the worry comes as a result from<br>the very lax default for time_change_threshold (900 seconds). A time<br>jump of 899 seconds wouldn't trigger a rescheduling, but would wreak<br>serious havoc with the checks.<br><br><br>Listing related contact groups<br>The patch needs to be changed so that the (possibly very long) list<br>of contactgroups isn't computed until it's requested instead of<br>before we even start macro substitution. Otherwise we'll be<br>computing that macro for each and every host and service check we<br>execute, which stupid beyond belief. Particularly considering the<br>fact that object config can't change during runtime (yet), so the<br>list could just as well be cached if one would so desire.<br>For bonus
 points, also add CONTACTLIST, which fetches contacts from<br>both the object directly and the contactgroups assigned.<br><br><br>Environment macros per-command<br>I wish you'd stop talking BS on that site of yours. Removal of<br>environment macros has very little to do with the speedups in Nagios 4.<br>Those improvements are the result of good design and proper<br>implementation of good design.<br>Now to technical issues; I have the patch (as I've said) and I do<br>intend to push it as soon as I've had time to polish it and bring it<br>forward to the current "master". It's quite invasive though, and<br>I've been trying to figure out what it is about it that feels wrong.<br>Then I've also forgotten about it, so this reminder was pretty good.<br>Thanks.<br><br><br>Allowing semi-colons in commands<br>Well, it's a neat idea, but the patch is so incredibly ugly that I<br>just can't bring myself to accept it. If you did something to keep<br>state and allowed
 semicolons in strings or as escaped creatures<br>(with a backslash, pretty please; There's enough home-cooked<br>escaping in Nagios already), I'd be willing to accept it.<br><br><br>Tilde symbol in commands<br>Absolutely out of the question. This patch deliberately breaks a<br>library to exploit its caller's fallback, which happens to suit your<br>particular needs in this case. No. Nonono. You can just configure<br>your way around it by using<br><br>    command_line  /bin/sh -c '$USER1$/plugin --arg=lala'<br><br>for the command in question, or implement it separately but making<br>it configurable as "expand_tilde_in_commands=<bool>" in nagios.cfg and<br>doing the replacement manually. It's not that hard, really.<br><br><br>Fix max_concurrent_checks decrementing<br>Obviously correct, although the patch is incomplete. In case we fail to<br>launch a job, it will have no reference in the scheduling queue but will<br>be marked as
 "is_executing" which will cause it to not even get<br>freshness checked. I'll amend the patch with everything it needs and<br>apply. Good catch though.<br><br><br>Extra external commands<br>This looks clean, correct and useful. I'll need a commit message, an<br>author and a signed-off-by before I can accept it though.<br><br><br>Thanks<br><br>-- <br>Andreas Ericsson                   <a ymailto="mailto:andreas.ericsson@op5.se" href="mailto:andreas.ericsson@op5.se">andreas.ericsson@op5.se</a><br>OP5 AB                             www.op5.se<br>Tel: +46 8-230225                  Fax: +46 8-230231<br><br>Considering the successes of the wars on alcohol, poverty, drugs and<br>terror, I think we should give some serious thought to declaring war<br>on
 peace.<br><br>------------------------------------------------------------------------------<br>Get 100% visibility into Java/.NET code with AppDynamics Lite!<br>It's a free troubleshooting tool designed for production.<br>Get down to code-level detail for bottlenecks, with <2% overhead. <br>Download for free and get started troubleshooting in minutes. <br><a href="http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk</a><br>_______________________________________________<br>Nagios-users mailing list<br><a ymailto="mailto:Nagios-users@lists.sourceforge.net" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>::: Please include Nagios version,
 plugin version (-v) and OS when reporting any issue. <br>::: Messages without supporting info will risk being sent to /dev/null<br><br><br></div> </div> </div>  </div></body></html>