)]}'
{"README.md":[{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"4af2ba8cd562f745b0c7c093be57c09b9f4fc068","unresolved":false,"context_lines":[{"line_number":129,"context_line":"| Agent Checks | checks.d/*.py | Python-based user-configured checks.  These checks can be for other applications or services to verify functionality or gather statistics on things such as messages processed, etc.  Each additional agent check must be configured using a yaml file for a specific plugin that provides the additional functionality located in the conf.d directory. |"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"The Agent includes the \"monasca-setup\" script, that can be used for automatically configuring the agent to generate metrics that are sent to the API.  It creates the agent.yaml file locate in /etc/monasca/agent directory.  It also sets up additional checks based on what is running locally on that machine.  For instance, if this is a compute node, the agent will setup checks to monitor the Nova processes and setup a http_status check on the nova-api.  It can also detect other servers such as mySQL and Kafka and setup checks for them as well."},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"A metric is identified by a name and dimensions.  The fields required in a metric are name, timestamp, and value.  A metric can also have 0..n dimensions.  Some standard dimensions are sent with all metrics that are sent by the agent.  Reference the section on [Dimensions](#dimensions) for more details."},{"line_number":135,"context_line":""}],"source_content_type":"text/x-gfm","patch_set":1,"id":"ba7be1f8_faea38d6","line":132,"updated":"2015-02-26 18:52:18.000000000","message":"\u0027located in the\u0027","commit_id":"fa11e9789d0c4fa51a987b20b9556223a4991c77"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"4af2ba8cd562f745b0c7c093be57c09b9f4fc068","unresolved":false,"context_lines":[{"line_number":160,"context_line":"The Agent requires configuration in order to run. There are two ways to configure the agent, either using the [monasca-setup](#monasca-setup) script or manually."},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"## monasca-setup (Recommended)"},{"line_number":163,"context_line":"The Monasca agent has a script, called \"monasca-setup\", that should be used to automatically configure the Agent to send metrics to a Monasca API. This script will create the agent.yaml configuration file as well as any plugin configuration yaml files needed to monitor the processes on the local machine.  The mon-setup script will auto-detect certain applications and OpenStack processes that are running on the machine.  The agent configuration files are located in /etc/monasca/agent.  The plugin configuration files are located in located in /etc/monasca/agent/conf.d."},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"To run monasca-setup:"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-gfm","patch_set":1,"id":"ba7be1f8_ba928054","line":163,"updated":"2015-02-26 18:52:18.000000000","message":"\u0027located in located\u0027?","commit_id":"fa11e9789d0c4fa51a987b20b9556223a4991c77"}],"agent.yaml.template":[{"author":{"_account_id":11094,"name":"Tim Kuhlman","email":"timothy.kuhlman@canonical.com","username":"kuhlmant"},"change_message_id":"ffed199e24e32212db12341ab1abd4728d84a3ec","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  # Optional dimensions to be sent with every metric from this node"},{"line_number":55,"context_line":"  # They should be in the format name:value and seperated by a comma"},{"line_number":56,"context_line":"  # Example (dimensions: service:nova, group:group_a, ...)"},{"line_number":57,"context_line":"  dimensions: {args.dimensions}"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  # Set the threshold for accepting points to allow anything"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"ba7be1f8_d221d1fd","line":56,"updated":"2015-02-26 23:13:40.000000000","message":"Should be a yaml list now ie:\ndimensions:\n  - dim1: value1\n  - dim2: value2","commit_id":"21f9e6a472f4add7ca79435bfa3ffadc7a5295f0"},{"author":{"_account_id":12108,"name":"Gary Hessler","email":"gary.hessler@hp.com","username":"garyh"},"change_message_id":"b64c52ac665d3028f5e2d33728fca20d4d14abec","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  # Optional dimensions to be sent with every metric from this node"},{"line_number":55,"context_line":"  # They should be in the format name:value and seperated by a comma"},{"line_number":56,"context_line":"  # Example (dimensions: service:nova, group:group_a, ...)"},{"line_number":57,"context_line":"  dimensions: {args.dimensions}"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  # Set the threshold for accepting points to allow anything"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"ba7be1f8_8f0500c4","line":56,"in_reply_to":"ba7be1f8_d221d1fd","updated":"2015-03-02 18:53:05.000000000","message":"Actually, this works better as a dictionary.  So it would look like this:\ndimensions:\n  dim1: value1\n  dim2: value2","commit_id":"21f9e6a472f4add7ca79435bfa3ffadc7a5295f0"}],"monasca_agent/common/config.py":[{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"4af2ba8cd562f745b0c7c093be57c09b9f4fc068","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            self._config \u003d self._retrieve_sections(file_config)"},{"line_number":69,"context_line":"        except Exception as e:"},{"line_number":70,"context_line":"            log.exception(\u0027Error loading config file from {0}\u0027.format(self._configFile))"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        # Process and update any special case configuration"},{"line_number":73,"context_line":"        self._parse_config()"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_baa0c090","line":71,"updated":"2015-02-26 18:52:18.000000000","message":"Don\u0027t we need to bubble up the exception?","commit_id":"fa11e9789d0c4fa51a987b20b9556223a4991c77"},{"author":{"_account_id":11094,"name":"Tim Kuhlman","email":"timothy.kuhlman@canonical.com","username":"kuhlmant"},"change_message_id":"ffed199e24e32212db12341ab1abd4728d84a3ec","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self._read_config()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def get_config(self, sections\u003d\u0027Main\u0027):"},{"line_number":42,"context_line":"        \"\"\"Get the config info.\"\"\""},{"line_number":43,"context_line":"        section_list \u003d []"},{"line_number":44,"context_line":"        if isinstance(sections, six.string_types):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_12728949","line":41,"updated":"2015-02-26 23:13:40.000000000","message":"Now that the config is a dictionary it seems like this entire method can go away. It simply becomes, config[\u0027section\u0027]","commit_id":"21f9e6a472f4add7ca79435bfa3ffadc7a5295f0"},{"author":{"_account_id":12108,"name":"Gary Hessler","email":"gary.hessler@hp.com","username":"garyh"},"change_message_id":"b64c52ac665d3028f5e2d33728fca20d4d14abec","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self._read_config()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def get_config(self, sections\u003d\u0027Main\u0027):"},{"line_number":42,"context_line":"        \"\"\"Get the config info.\"\"\""},{"line_number":43,"context_line":"        section_list \u003d []"},{"line_number":44,"context_line":"        if isinstance(sections, six.string_types):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_2f77b43c","line":41,"in_reply_to":"ba7be1f8_12728949","updated":"2015-03-02 18:53:05.000000000","message":"That is essentially what is being returned here.  I just give the option to pass a list of sections.  That way, the different applications can just get all the sections it needs in one call without getting the entire config.","commit_id":"21f9e6a472f4add7ca79435bfa3ffadc7a5295f0"},{"author":{"_account_id":11094,"name":"Tim Kuhlman","email":"timothy.kuhlman@canonical.com","username":"kuhlmant"},"change_message_id":"ffed199e24e32212db12341ab1abd4728d84a3ec","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                                  \u0027syslog_port\u0027: None}}"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        # Load values from configuration file into config file dictionary"},{"line_number":123,"context_line":"        for section in config.keys():"},{"line_number":124,"context_line":"            for option in config[section].keys():"},{"line_number":125,"context_line":"                try:"},{"line_number":126,"context_line":"                    option_value \u003d config[section][option]"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_f20175b0","line":123,"updated":"2015-02-26 23:13:40.000000000","message":"I think this can be simplified a lot by just merging the read config into the default config.","commit_id":"21f9e6a472f4add7ca79435bfa3ffadc7a5295f0"},{"author":{"_account_id":12108,"name":"Gary Hessler","email":"gary.hessler@hp.com","username":"garyh"},"change_message_id":"b64c52ac665d3028f5e2d33728fca20d4d14abec","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                                  \u0027syslog_port\u0027: None}}"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        # Load values from configuration file into config file dictionary"},{"line_number":123,"context_line":"        for section in config.keys():"},{"line_number":124,"context_line":"            for option in config[section].keys():"},{"line_number":125,"context_line":"                try:"},{"line_number":126,"context_line":"                    option_value \u003d config[section][option]"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_2f9ed454","line":123,"in_reply_to":"ba7be1f8_f20175b0","updated":"2015-03-02 18:53:05.000000000","message":"Done","commit_id":"21f9e6a472f4add7ca79435bfa3ffadc7a5295f0"},{"author":{"_account_id":11094,"name":"Tim Kuhlman","email":"timothy.kuhlman@canonical.com","username":"kuhlmant"},"change_message_id":"ffed199e24e32212db12341ab1abd4728d84a3ec","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def _parse_config(self):"},{"line_number":139,"context_line":"        if self._config[\u0027Main\u0027][\u0027dimensions\u0027] is not None:"},{"line_number":140,"context_line":"            \"\"\"Parse comma separated dimensions into a dimension list\"\"\""},{"line_number":141,"context_line":"            dimensions \u003d {}"},{"line_number":142,"context_line":"            try:"},{"line_number":143,"context_line":"                dim_list \u003d [dim.split(\u0027:\u0027) for dim in self._config[\u0027Main\u0027][\u0027dimensions\u0027].split(\u0027,\u0027)]"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_92a919e2","line":140,"updated":"2015-02-26 23:13:40.000000000","message":"This shouldn\u0027t be needed make them into a yaml list and they will end up as a list when parsed.","commit_id":"21f9e6a472f4add7ca79435bfa3ffadc7a5295f0"},{"author":{"_account_id":12108,"name":"Gary Hessler","email":"gary.hessler@hp.com","username":"garyh"},"change_message_id":"b64c52ac665d3028f5e2d33728fca20d4d14abec","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def _parse_config(self):"},{"line_number":139,"context_line":"        if self._config[\u0027Main\u0027][\u0027dimensions\u0027] is not None:"},{"line_number":140,"context_line":"            \"\"\"Parse comma separated dimensions into a dimension list\"\"\""},{"line_number":141,"context_line":"            dimensions \u003d {}"},{"line_number":142,"context_line":"            try:"},{"line_number":143,"context_line":"                dim_list \u003d [dim.split(\u0027:\u0027) for dim in self._config[\u0027Main\u0027][\u0027dimensions\u0027].split(\u0027,\u0027)]"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_8fb6e0da","line":140,"in_reply_to":"ba7be1f8_92a919e2","updated":"2015-03-02 18:53:05.000000000","message":"Done","commit_id":"21f9e6a472f4add7ca79435bfa3ffadc7a5295f0"}],"packaging/Makefile":[{"author":{"_account_id":11094,"name":"Tim Kuhlman","email":"timothy.kuhlman@canonical.com","username":"kuhlmant"},"change_message_id":"ffed199e24e32212db12341ab1abd4728d84a3ec","unresolved":false,"context_lines":[{"line_number":37,"context_line":"\tcp -r $(SRC)/monasca_agent $(ROOT)/"},{"line_number":38,"context_line":"\tcp -r $(SRC)/conf.d $(ROOT)/"},{"line_number":39,"context_line":"\tcp -r $(SRC)/LICENSE* $(ROOT)/"},{"line_number":40,"context_line":"\tcp -r $(SRC)/agent.yaml.template $(ROOT)/"},{"line_number":41,"context_line":"\tfind $(ROOT) -name \"*.pyc\" -exec rm {} \\;"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":2,"id":"ba7be1f8_d2f3919d","line":40,"updated":"2015-02-26 23:13:40.000000000","message":"Good job being thorough but I doubt this used anymore.","commit_id":"21f9e6a472f4add7ca79435bfa3ffadc7a5295f0"},{"author":{"_account_id":12108,"name":"Gary Hessler","email":"gary.hessler@hp.com","username":"garyh"},"change_message_id":"b64c52ac665d3028f5e2d33728fca20d4d14abec","unresolved":false,"context_lines":[{"line_number":37,"context_line":"\tcp -r $(SRC)/monasca_agent $(ROOT)/"},{"line_number":38,"context_line":"\tcp -r $(SRC)/conf.d $(ROOT)/"},{"line_number":39,"context_line":"\tcp -r $(SRC)/LICENSE* $(ROOT)/"},{"line_number":40,"context_line":"\tcp -r $(SRC)/agent.yaml.template $(ROOT)/"},{"line_number":41,"context_line":"\tfind $(ROOT) -name \"*.pyc\" -exec rm {} \\;"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":2,"id":"ba7be1f8_4f4948cf","line":40,"in_reply_to":"ba7be1f8_d2f3919d","updated":"2015-03-02 18:53:05.000000000","message":"Yes, the packaging needs to be cleaned up.  I wasn\u0027t sure if this was still being used for building the debs.  We can clean up the packaging at another time.","commit_id":"21f9e6a472f4add7ca79435bfa3ffadc7a5295f0"}]}
