Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Processor plugin should not create new metrics #29

Open
katarzyna-z opened this issue Dec 2, 2016 · 6 comments
Open

Processor plugin should not create new metrics #29

katarzyna-z opened this issue Dec 2, 2016 · 6 comments

Comments

@katarzyna-z
Copy link
Contributor

Processor plugin should not create new metrics
Now after processing there are metrics with namespaces in following forms:

/intel/statistics/intel/psutil/load/load1/trimean
/intel/statistics/intel/psutil/load/load1/standarddeviation
/intel/statistics/intel/psutil/load/load1/maximum

but collector plugin exposes following metric:

/intel/psutil/load/load1
@kindermoumoute
Copy link
Contributor

kindermoumoute commented Dec 2, 2016

This is the behavior of a processor. It shouldn't expose what was collected, but the added value of the collector.

If you want to expose collected metrics AND processed statistics:

{
    "version": 1,
    "schedule": {
        "type": "simple",
        "interval": "1s"
    },
    "workflow": {
        "collect": {
            "metrics": {
                "/intel/psutil/load/load1": {},
                "/intel/psutil/load/load5": {},
                "/intel/psutil/load/load15": {}
            },
            "process": [
                {
                    "plugin_name": "statistics",
                    "publish": [
                        {
                            "plugin_name": "file",
                            "config": {
                                "file": "/tmp/published_statistics.log"
                            }
                        }
                    ]
                }
            ],
            "publish": [
                {
                    "plugin_name": "file",
                    "config": {
                        "file": "/tmp/published_psutil.log"
                    }
                }
            ]
        }
    }
}

@katarzyna-z
Copy link
Contributor Author

This is not usual that processor plugin creates new metrics. I don't see in documentation information about it. If I'm right then this information should be added to documentation with clear examples.

@PraveenkumarDonga
Copy link

HI! kindermoumoute,
I created a task by copying the above code and running the task.
still I am not able to see below metrics in metrics list (I am using: snaptel metric list)
/intel/statistics/intel/psutil/load/load1/trimean
/intel/statistics/intel/psutil/load/load1/standarddeviation
/intel/statistics/intel/psutil/load/load1/maximum

Could you please help me with this.

Thanks,
Praveen

@katarzyna-z
Copy link
Contributor Author

@PraveenkumarDonga Metrics, which you mentioned, are created by processor plugin so probably this is the reason why you don't see metrics using snaptel metric list. Usually collector plugin exposes metrics.

Please check what is saved in /tmp/published_statistics.log (according to the task manifest).

@PraveenkumarDonga
Copy link

PraveenkumarDonga commented Dec 29, 2016

Hi!
Thank you for the reply first.
I am using grafana Dashboard to visualize these metrics. The Metrics only listed by the "sanptel metric list" are coming into the dashboard. So any idea about how to visualize these processed metrics.

Can we store these processed metrics into mongodb again.

Thanks,
Praveen

@katarzyna-z
Copy link
Contributor Author

@PraveenkumarDonga Please make sure that you have publish section in process section, something like this:

 "process": [
                {
                    "plugin_name": "statistics",
                    "publish": [
                        {
                            "plugin_name": "file",
                            "config": {
                                "file": "/tmp/published_statistics.log"
                            }
                        }
                    ]
                }
            ],

@mkleina mkleina added the bug label Feb 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants