Merge branch 'stable-2.9' into master
Implement readJSON functions for DC Types
Implement readJSON functions for DCCategory, DCVersion andDCKind in Data Collectors's Types to be parsable from a JSONformatted file. Also, implement a utility function tocapitalize the first character of a string....
Fetch data from MonD to HTools
Contact all MonDs from HTools to fetch data from its DataCollectors (only CPUload Data Collector is queried at themoment). This information is available to all HTools with the--mond option and can be ignored if the --ignore-dynu option is...
Make the inst-status-xen collector more resilient
The data collectors should be able to provide as much information as possibleeven when the system is badly degraded. This patch modifies the instance statuscollector for xen so that it can keep providing as much data as possible, even...
Move data types from 'Objects' to 'Types'
Move several Haskell data types from 'Ganeti.Objects' to'Ganeti.Types' in order to be able to generate constants whileavoiding module circularity.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Make CPUload Data Collector aware of clock ticks
Modify CPUload data collector to get the number of clock ticksper second from Posix.Unistd. Since CPUload collector convertsclock ticks (jiffies) to seconds and the clock ticks to secondsratio varies between linux distributions, it must be read from...
Merge branch 'stable-2.8' into stable-2.9
Make the DRBD collector more failure-resilient
If information about instances is not available, just log the error andcontinue without it.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Add CPUload collector
Introduce CPUload data collector as described in the correspondingdesign document. Add two data types in Datacollectors's Types.
Signed-off-by: Spyros Trigazis <strigazi@gmail.com>Signed-off-by: Michele Tartara <mtartara@google.com>...
Include "instance" information in LV data collector
This commit enables the logical volume data collector to get information aboutthe instances and to link it to the information about logical volumes.
The list of parameters accepted by the collector is expanded to allow proper...
Add option for loading serialized instances
Monitoring CLI tools might have to load serialized lists of instances(mainly for testing reasons). This patch adds an option to allow that.
Factor out lv info gathering function
The buildJsonReport function will soon have to perform the coupling ofinstance data with LVInfo data. In preparation for that, in order to makeit more readable, the instructions for obtaining LVInfos are factored out...
Factor out the getInstances function
The getInstances function can be useful in general, but is defined insidethe InstStatus data collector. This commit takes it out and adds it toa proper (newly created) library.
Signed-off-by: Michele Tartara <mtartara@google.com>...
Prevent LV parser compile error
The LV parser is not compiled correctly by more recent versions of GHCbecause of more strict checks.
lvCommand is a surely non-empty list, but the compiler still refuses itasking for explicitly management of the empty list case....
Add LV data collector
This commit adds the LV data collector.
Also, the lvCommand function was not providing the correct value as expected bythe readProcess function, so it was fixed.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Rename directory 'Block' to 'Storage'
This patch renames the 'Block' directory to 'Storage' inthe Haskell code base. The same rename was done in thepython code base earlier this quarter. We generalize thename, because we needed a place for general storage...
Add diskstats data collector
Add a new data collector responsible for gathering disk performancestatistics.
Add a CLI parameter for input files
For many data collectors it is useful (especially for testing) to have topossibility to specify an input file.
This commit adds a generic option for doing that.
Use dcName in mon-collector
Instead of manually specify the name of the data collectors in mon-collector,just use the dcName field each of them exports.
Factor out the mergeStatuses function
It will be used by multiple data collectors, not only the DRBD collector.
Add global status field to the instance status collector
The global status is computed from the statuses of the single instances.
The output json format is adapted to include this piece of information, asprescribed by the design document.
Export the Instance Status collector report
It will need to be accessed by the monitoring daemon.
Add the core of the instance status collector
Add the Xen instance status data collector with only its core features.The next commits will add more reporting functionalities.
The access to the collector is made possible through the mon-collectortool....
Export the actual instance state
Compute the actual state of the instance and export it.
Determine status of one instance
Added function for determining whether the status of an instance is ok, and torepresent this information in the corresponding field in the report.
Include the reason trail in the instance collector output
Fetch the reason trail from file, failing gracefully if it is not found, andinclude it in the output of the instance status data collector.
Export Instance Status collector information
Name, version, format version, category and kind of the Instance Status datacollector are now exported.
Factor out function for building report
Instead of building the report as part of the "Main" function, have itbuilt by its own dedicated function, so that it will be able to export itdirectly to the monitoring daemon when needed.
Export the full report from DRBD data collector
Export the full report instead of just the data from the DRBD data collector.
Update JSON serialization for "category"
Change the JSON serialization for the "category" field of data collectors,in accordance to the latest version of the design document.
Add status information to the DRBD data collector report
Add status information as required by the design document.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Export the data collected by DRBD in JSON format
Write an intermediate function computing the JSON data before adding themto the DCReport.
Directly export the data computed by that function (with default parameters)allowing them to be used (in the future) by the monitoring agent....
Add DCStatus data type for the data collectors
Also adds the DCStatusCode, part of DCStatus, and the addStatusutility function for adding the "status" field to an already existingJSValue.
The design document is updated to have the status codes sorted by increasing...
Add Kind data type for data collectors
Also, add it to the DRBD data collector, and export it from there.
Add data type for data collector category
Also, update the DRBD data collector to use and export it.
Export the dcVersionInformation for the Drbd collector
Also, update the JSON output (and the design document) so that it is notin camelcase anymore. This is part of a bigger effort to remove camelcasefrom the exposed JSON.
Add data collector version data type
Define the new data type and update the DRBD data collector to use it.
Fix comment line position in DRBD data collector
Export dcName information of Drbd data collector
Make Confd client usable for testing
Allow the Confd client to be able to connect to an arbitrary serverinstead of just the real one running on a cluster.
This is meant to be used for testing.
If a data collector using the Confd client is tested with shelltest, it will...
Integrate DRBD with the report generation infrastructure
With this commit, the DRBD data collector does not only print the datait extracts, but includes them in the proper JSON structure common toall the data collectors, as prescribed by the design document....
Add reporting infrastructure for data collectors
This commit adds the part of the JSON report generation code that will becommon to all the data collectors, according to the format specified in thedesign document.
Support instance-minor pairing in the DRBD collector
This commits enables the DRBD data collector to use the Confd client togather information about the pairing between DRBD minors and instances.
For testing purposes, the DRBD data collector now requires either zero...
Support integrating instance information in the DRBD parser
This commit modifies the DRBD parser and its data structures to includeinformation about the instance a DRBD minor belongs to.
Test files have been updated as well, to support the new field in the data...
Rename htools/ to src/
Per offline discussions, this is the first patch of therenames. Tested with "make distcheck", seems to work fine.
The only change outside of the renaming is a bit of simplification inthe .gitignore rules; otherwise, simply s/htools/src/....