Skip to content

Commit

Permalink
Merge branch 'master' into Add_parser_iris_list
Browse files Browse the repository at this point in the history
  • Loading branch information
wushiqinlou authored Jun 28, 2023
2 parents a162577 + 358e13e commit fa66775
Show file tree
Hide file tree
Showing 5 changed files with 669 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/shared_parsers_catalog/eap_json_reports.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.. automodule:: insights.parsers.eap_json_reports
:members:
:show-inheritance:
49 changes: 49 additions & 0 deletions insights/parsers/eap_json_reports.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"""
EAP Json Report Files
=====================
EAP runtime will generate JSON report files under /var/tmp/insights-runtimes/uploads/
This module provides processing for the json report files of EAP runtimes.
"""

from insights.core import JSONParser
from insights.core.plugins import parser
from insights.specs import Specs


@parser(Specs.eap_json_reports)
class EAPJSONReports(JSONParser):
"""
Class to parse the EAP json report files.
Sample input data::
{
"version": "1.0.0",
"idHash": "e38277334d0f6b6fdc6f3b831fb102cdd70f04faab5c38b0be36fb1aacb4236e",
"basic": {
"app.user.dir": "/opt/t_eap/jboss-eap-7.4",
"java.specification.version": "1.8",
"java.runtime.version": "1.8.0_362-b09",
"java.class.path": "/opt/t_eap/jboss-eap-7.4/jboss-modules.jar",
"system.os.version": "4.18.0-425.13.1.el8_7.x86_64",
"jvm.args": [
"-D[Standalone]",
"-verbose:gc",
"-Xloggc:/opt/t_eap/jboss-eap-7.4/standalone/log/gc.log",
"-Djboss.modules.system.pkgs=org.jboss.byteman",
"-Dorg.jboss.boot.log.file=/opt/t_eap/jboss-eap-7.4/standalone/log/server.log",
"-Dlogging.configuration=file:/opt/t_eap/jboss-eap-7.4/standalone/configuration/logging.properties"
]
}
}
Examples:
>>> type(eap_json_report)
<class 'insights.parsers.eap_json_reports.EAPJSONReports'>
>>> str(eap_json_report["version"])
'1.0.0'
>>> "idHash" in eap_json_report
True
"""
pass
1 change: 1 addition & 0 deletions insights/specs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ class Specs(SpecSet):
du_dirs = RegistryPoint(multi_output=True, filterable=True)
dumpe2fs_h = RegistryPoint(multi_output=True)
duplicate_machine_id = RegistryPoint(filterable=True)
eap_json_reports = RegistryPoint(multi_output=True)
engine_config_all = RegistryPoint()
engine_db_query_vdsm_version = RegistryPoint()
engine_log = RegistryPoint(filterable=True)
Expand Down
1 change: 1 addition & 0 deletions insights/specs/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ class DefaultSpecs(Specs):
dse_ldif = glob_file("/etc/dirsrv/*/dse.ldif")
du_dirs = foreach_execute(dir_list.du_dir_list, "/bin/du -s -k %s")
duplicate_machine_id = machine_ids.dup_machine_id_info
eap_json_reports = glob_file(r"/var/tmp/insights-runtimes/uploads/*.json")
engine_log = simple_file("/var/log/ovirt-engine/engine.log")
etc_journald_conf = simple_file(r"etc/systemd/journald.conf")
etc_journald_conf_d = glob_file(r"etc/systemd/journald.conf.d/*.conf")
Expand Down
Loading

0 comments on commit fa66775

Please sign in to comment.