Hi
> Defining a single format of passing results simplifies handling > and saves some cycle. a single format for both python-based checks and traditional plugins requires converting the output and exitcode of the latter. This probably adds a lot more cycles. > > Question: should message and long status message be split al all? Or > should it be one element, a list, where the first line is the > message and the remaining lines are the long status message? The result of a plugin is a string, single-line or multiline. > * The base-class will have a method "as_string()" to convert the > result tuple into a Nagios-compatible string. Thus each check can be > used for Nagios. This string will be printed by the "test()" method, > too. The output string is just "decoration" from Nagios' perspective, the crutial attribute of a check is the exit code. Nagios can work without outputs, but not without exit codes. In order to be usable with Nagios there must be something like if __name__ == '__main__': # runs as standalone python program plugin = Class... print plugin.output + '|' + plugin.perfdata exit plugin.exitcode so the file can be "imported" and cached by a Shinken poller and executed by a Nagios. (similar to ePN) > * The performance data will be a dict. Keys are strings, values are > either integer, float or string (percent), or a list/tuple thereof. What about min/max/thresholds? > Question: Do we need float results? Of course. The de facto way to handle performance data is pnp and pnp wants strings. I see no reason to store perfdata in any datatype except a string. The Shinken core doesn't care for performance data except passing them to external tools where they are processed. Also database backends (ndo, merlin) want strings. Gerhard __________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 5835 (20110131) __________ E-Mail wurde gepruft mit ESET NOD32 Antivirus. http://www.eset.com ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Shinken-devel mailing list Shinken-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/shinken-devel