1
votes

I am currently using graphite to monitor metrics from an API server. I use statsd/carbon to retrieve metrics via graphite (I use the docker from here / https://github.com/hopsoft/docker-graphite-statsd).

The thing is, I cannot keep the carbon data more than one or two days after the carbon data was created. It works perfectly well for statsd - I have monitored the response time and number of requests/errors on my endpoints more than a week ago and can still have access to it. And the very same day that I send this data, carbon data (cpu usage, memory used...) was also available, but now it is not visible any more. Is there any fix I can do?

Thank you very much!

-- smgr

2

2 Answers

0
votes

Did you check your storage-schemas.conf file? That configures the storage retention per metric. You will have to delete or resize existing wsp files after you change it.

0
votes

This is what I get when I use the command docker inspect graphite... However, none of the paths mentioned actually exist (for instance, I do not have a graphite folder in /opt) ... :/

Did I miss a step in the installation/configuration or something?

[{"Id": "5864b754f8a9671ad1ad2c48b992e33fea33551f3f7f6b3a9139a2a95dd57c56",

    "Created": "2017-07-26T10:11:29.868707602Z",
    "Path": "/sbin/my_init",
    "Args": [],
    "State": {
        "Status": "created",
        "Running": false,
        "Paused": false,
        "Restarting": false,
        "OOMKilled": false,
        "Dead": false,
        "Pid": 0,
        "ExitCode": 128,
        "Error": "driver failed programming external connectivity on endpoint graphite (c30ef84fc31049bd1f711027996e4619ba3a46e6171901822eb73c951d531803): Error starting userland proxy: listen tcp 0.0.0.0:80: listen: address already in use",
        "StartedAt": "0001-01-01T00:00:00Z",
        "FinishedAt": "0001-01-01T00:00:00Z"
    },
    "Image": "sha256:2cc9a7dfe93b5a3406091869b652df5fab9d0324b2a09d0be8421ea1f75826ca",
    "ResolvConfPath": "/var/lib/docker/containers/5864b754f8a9671ad1ad2c48b992e33fea33551f3f7f6b3a9139a2a95dd57c56/resolv.conf",
    "HostnamePath": "",
    "HostsPath": "/var/lib/docker/containers/5864b754f8a9671ad1ad2c48b992e33fea33551f3f7f6b3a9139a2a95dd57c56/hosts",
    "LogPath": "",
    "Name": "/graphite",
    "RestartCount": 0,
    "Driver": "aufs",
    "MountLabel": "",
    "ProcessLabel": "",
    "AppArmorProfile": "",
    "ExecIDs": null,
    "HostConfig": {
        "Binds": null,
        "ContainerIDFile": "",
        "LogConfig": {
            "Type": "json-file",
            "Config": {}
        },
        "NetworkMode": "default",
        "PortBindings": {
            "2003/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "2003"
                }
            ],
            "2004/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "2004"
                }
            ],
            "2023/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "2023"
                }
            ],
            "2024/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "2024"
                }
            ],
            "80/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "80"
                }
            ],
            "8125/udp": [
                {
                    "HostIp": "",
                    "HostPort": "8125"
                }
            ],
            "8126/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "8126"
                }
            ]
        },
        "RestartPolicy": {
            "Name": "always",
            "MaximumRetryCount": 0
        },
        "AutoRemove": false,
        "VolumeDriver": "",
        "VolumesFrom": null,
        "CapAdd": null,
        "CapDrop": null,
        "Dns": [],
        "DnsOptions": [],
        "DnsSearch": [],
        "ExtraHosts": null,
        "GroupAdd": null,
        "IpcMode": "",
        "Cgroup": "",
        "Links": null,
        "OomScoreAdj": 0,
        "PidMode": "",
        "Privileged": false,
        "PublishAllPorts": false,
        "ReadonlyRootfs": false,
        "SecurityOpt": null,
        "UTSMode": "",
        "UsernsMode": "",
        "ShmSize": 67108864,
        "Runtime": "runc",
        "ConsoleSize": [
            0,
            0
        ],
        "Isolation": "",
        "CpuShares": 0,
        "Memory": 0,
        "NanoCpus": 0,
        "CgroupParent": "",
        "BlkioWeight": 0,
        "BlkioWeightDevice": null,
        "BlkioDeviceReadBps": null,
        "BlkioDeviceWriteBps": null,
        "BlkioDeviceReadIOps": null,
        "BlkioDeviceWriteIOps": null,
        "CpuPeriod": 0,
        "CpuQuota": 0,
        "CpuRealtimePeriod": 0,
        "CpuRealtimeRuntime": 0,
        "CpusetCpus": "",
        "CpusetMems": "",
        "Devices": [],
        "DeviceCgroupRules": null,
        "DiskQuota": 0,
        "KernelMemory": 0,
        "MemoryReservation": 0,
        "MemorySwap": 0,
        "MemorySwappiness": -1,
        "OomKillDisable": false,
        "PidsLimit": 0,
        "Ulimits": null,
        "CpuCount": 0,
        "CpuPercent": 0,
        "IOMaximumIOps": 0,
        "IOMaximumBandwidth": 0
    },
    "GraphDriver": {
        "Data": null,
        "Name": "aufs"
    },
    "Mounts": [
        {
            "Type": "volume",
            "Name": "7c5691b26b893f0e12784bba6ce1616cac9aa942eae0ea0f8de2f9c3c9df0313",
            "Source": "",
            "Destination": "/etc/logrotate.d",
            "Driver": "local",
            "Mode": "",
            "RW": true,
            "Propagation": ""
        },
        {
            "Type": "volume",
            "Name": "2abf2652bb382d78a558f9dbaeb730197312b633276c5b49ea30d9b1c892690b",
            "Source": "",
            "Destination": "/etc/nginx",
            "Driver": "local",
            "Mode": "",
            "RW": true,
            "Propagation": ""
        },
        {
            "Type": "volume",
            "Name": "66373f1180605928d4cb56a9b22fd22a0511f6be3ef1445de7fa7b8f2718794b",
            "Source": "",
            "Destination": "/opt/graphite/conf",
            "Driver": "local",
            "Mode": "",
            "RW": true,
            "Propagation": ""
        },
        {
            "Type": "volume",
            "Name": "30514c45cf7c315010bd2f0d59f8b40c9a8eb2e1d47d0e3dd02cac99cbf40963",
            "Source": "",
            "Destination": "/opt/graphite/storage",
            "Driver": "local",
            "Mode": "",
            "RW": true,
            "Propagation": ""
        },
        {
            "Type": "volume",
            "Name": "0df80d56c1316a79b919b2d170dbee547677f79b7e6de66dc6e7f62e9c423703",
            "Source": "",
            "Destination": "/opt/statsd",
            "Driver": "local",
            "Mode": "",
            "RW": true,
            "Propagation": ""
        },
        {
            "Type": "volume",
            "Name": "ea42f5555bc08b2cd3323a17e7fc957bc82088af504a186f6238a10baef1b118",
            "Source": "",
            "Destination": "/var/log",
            "Driver": "local",
            "Mode": "",
            "RW": true,
            "Propagation": ""
        }
    ],
    "Config": {
        "Hostname": "5864b754f8a9",
        "Domainname": "",
        "User": "",
        "AttachStdin": false,
        "AttachStdout": false,
        "AttachStderr": false,
        "ExposedPorts": {
            "2003/tcp": {},
            "2004/tcp": {},
            "2023/tcp": {},
            "2024/tcp": {},
            "80/tcp": {},
            "8125/udp": {},
            "8126/tcp": {}
        },
        "Tty": false,
        "OpenStdin": false,
        "StdinOnce": false,
        "Env": [
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "HOME=/root"
        ],
        "Cmd": [
            "/sbin/my_init"
        ],
        "ArgsEscaped": true,
        "Image": "hopsoft/graphite-statsd",
        "Volumes": {
            "/etc/logrotate.d": {},
            "/etc/nginx": {},
            "/opt/graphite/conf": {},
            "/opt/graphite/storage": {},
            "/opt/statsd": {},
            "/var/log": {}
        },
        "WorkingDir": "/",
        "Entrypoint": null,
        "OnBuild": null,
        "Labels": {}
    },
    "NetworkSettings": {
        "Bridge": "",
        "SandboxID": "7a2a711d4a05100058901316718d2165a59c99e19f4df18d3641fa9373a9c911",
        "HairpinMode": false,
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "Ports": {},
        "SandboxKey": "/var/run/docker/netns/7a2a711d4a05",
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null,
        "EndpointID": "",
        "Gateway": "",
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "IPAddress": "",
        "IPPrefixLen": 0,
        "IPv6Gateway": "",
        "MacAddress": "",
        "Networks": {
            "bridge": {
                "IPAMConfig": null,
                "Links": null,
                "Aliases": null,
                "NetworkID": "4a497ec3a58479f07a839a23f9611eee37536a519ed3a90f603dc98558ef9f4a",
                "EndpointID": "",
                "Gateway": "",
                "IPAddress": "",
                "IPPrefixLen": 0,
                "IPv6Gateway": "",
                "GlobalIPv6Address": "",
                "GlobalIPv6PrefixLen": 0,
                "MacAddress": "",
                "DriverOpts": null
            }
        }
    }
}