Giter Site home page Giter Site logo

Comments (5)

aravindavk avatar aravindavk commented on September 18, 2024 1

For Gd1
`gluster volume info --xml
generates the same data in a different format with different headings, could directly parse that directly, or convert it into JSON.

New format contains sub volume information, which is very helpful in case of getting Volume utilization without mounting the gluster volume as mentioned in the blog http://aravindavk.in/blog/monitoring-glusterfs-volume-utilization/

I am working on a patch which adds support for consuming the XML output by converting it into the new format.

from gluster-prometheus.

aravindavk avatar aravindavk commented on September 18, 2024

Brick metrics are currently dependent on volinfo file which will be given as input to the exporter. Work is still under progress to generate volinfo file which is compatible for both glusterd1 and glusterd2. Documentation related to that setup is also in progress.

@shtripat please upload the sample volinfo file you used for testing. So that others can try that out.

from gluster-prometheus.

shtripat avatar shtripat commented on September 18, 2024

Here is a sample volinfo json (generated using curl to gd2 at the moment). Similar file would be generated for gd1 as well.

[
    {
        "disperse-count": 3,
        "distribute-count": 1,
        "id": "281a8770-0e70-40ac-a667-9827a00fb3d1",
        "metadata": {},
        "name": "displvol2",
        "options": {},
        "replica-count": 1,
        "snap-list": [],
        "state": "Started",
        "subvols": [
            {
                "arbiter-count": 0,
                "bricks": [
                    {
                        "host": "host-ip-1",
                        "id": "dbe1378e-7991-44be-a70c-5f02b00f02e6",
                        "path": "/root/gluster_bricks/vol3_b1",
                        "peer-id": "5d3a50a6-c9c9-42fd-b959-f2ec07624755",
                        "type": "Brick",
                        "volume-id": "281a8770-0e70-40ac-a667-9827a00fb3d1",
                        "volume-name": "displvol2"
                    },
                    {
                        "host": "host-ip-2",
                        "id": "1974eb3b-2796-4c67-8b2f-ea977ce60199",
                        "path": "/root/gluster_bricks/vol3_b2",
                        "peer-id": "38ad4135-35f9-4c9a-af69-49609603b7d3",
                        "type": "Brick",
                        "volume-id": "281a8770-0e70-40ac-a667-9827a00fb3d1",
                        "volume-name": "displvol2"
                    },
                    {
                        "host": "host-ip-3",
                        "id": "a85865a3-0649-448f-b19a-ef1b3be032ba",
                        "path": "/root/gluster_bricks/vol3_b3",
                        "peer-id": "9bba7f14-e435-403b-bf09-2835d6bc1b27",
                        "type": "Brick",
                        "volume-id": "281a8770-0e70-40ac-a667-9827a00fb3d1",
                        "volume-name": "displvol2"
                    }
                ],
                "disperse-count": 3,
                "disperse-data-count": 2,
                "name": "displvol2-disperse-0",
                "replica-count": 1,
                "type": "Disperse"
            }
        ],
        "transport": "tcp",
        "type": "Disperse"
    },
    {
        "distribute-count": 2,
        "id": "f196d8c2-08fc-4702-ae47-7b4ad32015ab",
        "metadata": {},
        "name": "testvol",
        "options": {},
        "replica-count": 3,
        "snap-list": [],
        "state": "Started",
        "subvols": [
            {
                "arbiter-count": 0,
                "bricks": [
                    {
                        "host": "host-ip-1",
                        "id": "3357f2e7-a788-4679-a10f-81335f3de7a5",
                        "path": "/root/gluster_bricks/vol1_b1",
                        "peer-id": "38ad4135-35f9-4c9a-af69-49609603b7d3",
                        "type": "Brick",
                        "volume-id": "f196d8c2-08fc-4702-ae47-7b4ad32015ab",
                        "volume-name": "testvol"
                    },
                    {
                        "host": "host-ip-2",
                        "id": "7933f8ac-ea2f-42ad-af15-ce1944bc55c5",
                        "path": "/root/gluster_bricks/vol1_b2",
                        "peer-id": "5d3a50a6-c9c9-42fd-b959-f2ec07624755",
                        "type": "Brick",
                        "volume-id": "f196d8c2-08fc-4702-ae47-7b4ad32015ab",
                        "volume-name": "testvol"
                    },
                    {
                        "host": "host-ip-3",
                        "id": "afa12a97-9658-4bc9-9e7d-224e65c40675",
                        "path": "/root/gluster_bricks/vol1_b3",
                        "peer-id": "9bba7f14-e435-403b-bf09-2835d6bc1b27",
                        "type": "Brick",
                        "volume-id": "f196d8c2-08fc-4702-ae47-7b4ad32015ab",
                        "volume-name": "testvol"
                    }
                ],
                "disperse-count": 0,
                "name": "testvol-replicate-0",
                "replica-count": 3,
                "type": "Replicate"
            },
            {
                "arbiter-count": 0,
                "bricks": [
                    {
                        "host": "host-ip-1",
                        "id": "390b6117-ca84-47ba-bdad-11771716cf16",
                        "path": "/root/gluster_bricks/vol1_b4",
                        "peer-id": "38ad4135-35f9-4c9a-af69-49609603b7d3",
                        "type": "Brick",
                        "volume-id": "f196d8c2-08fc-4702-ae47-7b4ad32015ab",
                        "volume-name": "testvol"
                    },
                    {
                        "host": "host-ip-2",
                        "id": "ef40df91-579e-415b-af74-6f6292fbe3f2",
                        "path": "/root/gluster_bricks/vol1_b5",
                        "peer-id": "5d3a50a6-c9c9-42fd-b959-f2ec07624755",
                        "type": "Brick",
                        "volume-id": "f196d8c2-08fc-4702-ae47-7b4ad32015ab",
                        "volume-name": "testvol"
                    },
                    {
                        "host": "host-ip-3",
                        "id": "0d77ccd8-3248-4e3f-8ca2-bcb9e7d1abc2",
                        "path": "/root/gluster_bricks/vol1_b6",
                        "peer-id": "9bba7f14-e435-403b-bf09-2835d6bc1b27",
                        "type": "Brick",
                        "volume-id": "f196d8c2-08fc-4702-ae47-7b4ad32015ab",
                        "volume-name": "testvol"
                    }
                ],
                "disperse-count": 0,
                "name": "testvol-replicate-1",
                "replica-count": 3,
                "type": "Replicate"
            }
        ],
        "transport": "tcp",
        "type": "Distributed-Replicate"
    }
]

from gluster-prometheus.

DrEVILish avatar DrEVILish commented on September 18, 2024

For Gd1
`gluster volume info --xml
generates the same data in a different format with different headings, could directly parse that directly, or convert it into JSON.

for instance "path": would have to be split from brick[n].name into [0]-hostname/ip [1]-path

from gluster-prometheus.

aravindavk avatar aravindavk commented on September 18, 2024

With this PR, brick related metrics will appear in exported metrics

#35

from gluster-prometheus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.