【问题标题】:Lost carbon data - graphite丢失的碳数据 - 石墨
【发布时间】:2017-08-08 05:20:01
【问题描述】:

我目前正在使用石墨来监控来自 API 服务器的指标。我使用 statsd/carbon 通过石墨检索指标(我使用这里的 docker /https://github.com/hopsoft/docker-graphite-statsd)。

问题是,我不能在碳数据创建后的一两天内保留碳数据。它非常适用于 statsd - 一个多星期前,我已经监控了我的端点上的响应时间和请求/错误的数量,并且仍然可以访问它。在我发送这些数据的同一天,碳数据(cpu 使用情况、内存使用情况......)也可用,但现在它不再可见。有什么办法可以解决吗?

非常感谢!

-- smgr

【问题讨论】:

    标签: graphite grafana graphite-carbon carbon-data


    【解决方案1】:

    您是否检查了您的 storage-schemas.conf 文件?这配置了每个指标的存储保留。更改后,您必须删除现有的 wsp 文件或调整其大小。

    【讨论】:

    • 好的,问题是,我无法找到/访问任何配置文件...当我尝试使用 apt-file 找到它们时,它给了我计算机上实际上不存在的文件夹路径,我在这里有点困惑
    • 根据您提供的链接,它应该在容器内的/opt/graphite/conf/storage-schemas.conf 中。见:link
    • 我知道,但该文件实际上并不存在...我的 opt 文件夹中没有石墨文件夹。我无权访问任何配置文件,老实说这很麻烦
    • 奇怪,刚刚安装了docker容器,发现配置文件docker inspect graphite见自述文件。
    • 我没有读过这部分读我必须承认...只是做了命令。它返回我在我的 owm 帖子的答案中输入的内容,但是再一次,这些路径似乎实际上并不存在:/
    【解决方案2】:

    这是我使用命令 docker inspect 石墨时得到的...但是,实际上没有提到的路径存在(例如,我在 /opt 中没有石墨文件夹)...:/

    我是否错过了安装/配置中的某个步骤?

    [{"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
                }
            }
        }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多