Giter VIP home page Giter VIP logo

cpanel_exporter's People

Stargazers

 avatar

Watchers

 avatar

cpanel_exporter's Issues

cpanel_quota_used and cpanel_quota_percent are always zero

Hi;

Thank you so much for the awesome cPanel exporter. I have found an issue where the values for cpanel_quota_used and cpanel_quota_percent are always zero. I have tested on 3 different servers and those values are never larger than zero.

The following error is also observed in logs

fetch.go:123: error: json: cannot unmarshal number into Go struct field .result.data.megabytes_used of type string
fetch.go:123: error: json: cannot unmarshal number into Go struct field .result.data.megabyte_limit of type string

I'm not familiar with Go and cannot help with fixing the issue, but I think the issue is caused by how cPanel UAPI returns data. I have noticed that the JSON response for the call /usr/bin/uapi --user=username --output=json Quota get_quota_info sometimes includes floats and sometimes string for the values of megabyte_limit and megabytes_remain depending on whether the package is configured with Unlimited quota or not.

Here are some sample relevant values from real accounts

"megabyte_limit":"0.00", "megabytes_remain":"0.00",  "megabytes_used":53.92
"megabyte_limit":"0.00", "megabytes_remain":"0.00",  "megabytes_used":3.05,
"megabyte_limit":"0.00", "megabytes_remain":"0.00",  "megabytes_used":18.57
"megabyte_limit":2000,   "megabytes_remain":1996.43, "megabytes_used":3.57
"megabyte_limit":4000,   "megabytes_remain":3975.55, "megabytes_used":24.45

I hope you find this helpful.

cpanel exporter keeps crashing on multiple servers

Started seeing that cpanel exporter keeps crashing with segmentation fault. This is happening on random servers.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x7f2fab]

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.