Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

troubleshootiness 3.2 files

chris grzegorczyk edited this page Oct 16, 2012 · 5 revisions

Table of Contents

Fault message template options

Formatted strings

  • One file per language. Language is defined by file name's suffix: EN, RU, FR, etc.
  • File's encoding is UTF-8.
  • Some C/Java string format specifiers are allowed inside fault template
    • %s
    • %i

JSON based

  • File is a JSON object that has version, description url and array of fault messages.
  • Each fault message a well formatted JSON object.
  • Each object must have code, problem (message and optional localized message) and resolution (message and optional localized message).


Example: { "version": "1", "description": "This file has localized error messages. For more information visit http://eucalyptus.com/blah/foo", "common": { "user":"пользователь", "foo": "что-то" }, "faults": [ { "id": "1232", "problem": { "message": "directory %s does not exists", "localized": "отсутствует директория %s" }, "resolution": { "message": "please create directory %s with 600 permission for user %s", "localized": "создайте директорию %s с правами доступа 600 для пользователя %s" } } ] }

XML based

  • File is a XML document that has version, description url and list of fault messages.
  • Each fault message must have code, problem (message and optional localized message) and resolution (message and optional localized message).
Example: <?xml version="1.0" encoding="UTF-8"?> <faults version="1" description="This file has localized error messages. For more information visit http://eucalyptus.com/blah/foo"> <common> <attr message="user" localized="пользователь"/> </common> <fault> <id>1232</id> <problem> <message>directory %s does not exists</message> <localized>отсутствует директория %s</localized> </problem> <resolution> <message>please create directory %s with 600 permission for user %s</message> </fault> </faults>

Properties

Example: fault.123.problem.message: directory %s does not exists fault.123.problem.localized: отсутствует директория %s fault.123.resolution.message: please create directory %s with 600 permission for user %s fault.123.resolution.localized: создайте директорию %s с правами доступа 600 для пользователя %s

Notes

It might be beneficial to have template file validation tool. This tool should check files for consistency and accuracy.

gettext()

Code will print error message using log_fault (gettext(ERR234-fault), gettext(ERR234-cause), ...) if we don't want to have descriptive messages in the code or log_fault (ERR234, gettext("Disk full"), printf(gettext("Please free some space on %s"), "/opt/eucalyptus"), ...) if we are ok to have canonical (English) version in the code.

Fault log options

  • File encoding: UTF-8
  • File's headers:



JSON based

  • Each fault message is a well formatted JOSN object.
  • One message per line with system depended new line separator.
  • Splunk and JSON

Text bases

  • Each fault message is clearly separated from each over.
  • Use system depended new line separator.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''* ERR-3456 YYYY-MM-DDTHH:MM:SS.MMMZ fault: ntpd is not running ERR-3456 YYYY-MM-DDTHH:MM:SS.MMMZ condition: can't find running ntpd process ERR-3456 YYYY-MM-DDTHH:MM:SS.MMMZ cause: cause unknown ERR-3456 YYYY-MM-DDTHH:MM:SS.MMMZ initiator: user234245 ERR-3456 YYYY-MM-DDTHH:MM:SS.MMMZ where: the one you installed ERR-3456 YYYY-MM-DDTHH:MM:SS.MMMZ resolution: ERR-3456 YYYY-MM-DDTHH:MM:SS.MMMZ ERR-3456 YYYY-MM-DDTHH:MM:SS.MMMZ 1) install NTPD ERR-3456 YYYY-MM-DDTHH:MM:SS.MMMZ 2) run NTPD ERR-3456 YYYY-MM-DDTHH:MM:SS.MMMZ ntpd is not running ERR-3456 ERR-3456 condition: can't find running ntpd process ERR-3456 cause: cause unknown ERR-3456 initiator: user234245 ERR-3456 location: ntpd daemon on localhost ERR-3456 resolution: ERR-3456 ERR-3456 1) install NTPD ERR-3456 2) run NTPD ERR-3456 YYYY-MM-DDTHH:MM:SS.MMMZ ntpd is not running | | condition: can't find running ntpd process | cause: cause unknown | initiator: user234245 | location: ntpd daemon on localhost | resolution: | | 1) install NTPD | 2) run NTPD
tag:rls-3-2



Clone this wiki locally