Netdata Community

Go.plugin whois monitor cant get correct expiration time

Environment

Server: Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-73-generic x86_64)
Netdata: v1.30.1

Problem/Question

go.plugin whois monitor cant get correct expiration time, and the value is always -9223372036.

conf

# ------------------------------------------------MODULE-CONFIGURATION--------------------------------------------------
# [ GLOBAL ]
update_every: 60
# autodetection_retry: 0
# priority: 70000
#
#
# jobs:
#   - name: example
#     source: example.org

jobs:
 - name: annangela.cn
   source: annangela.cn
   days_until_expiration_warning: 14
   days_until_expiration_critical: 7

Troubleshooting output

[ DEBUG ] run[manager] run.go:41 tick 60
CHART 'netdata.execution_time_of_whoisquery_annangela.cn' '' 'Execution Time for whoisquery_annangela.cn' 'ms' 'go.d' 'netdata.go_plugin_execution_time' '' '145000' '60' '' 'go.d' 'whoisquery'
DIMENSION 'time' '' '' '1' '1' ''

CHART 'whoisquery_annangela.cn.time_until_expiration' '' 'Time Until Domain Expiration' 'seconds' 'expiration time' 'whoisquery.time_until_expiration' '' '70000' '60' 'store_first' 'go.d' 'whoisquery'
DIMENSION 'expiry' '' '' '1' '1' ''
VARIABLE CHART 'days_until_expiration_warning' = 0
VARIABLE CHART 'days_until_expiration_critical' = 0

BEGIN 'whoisquery_annangela.cn.time_until_expiration'
SET 'expiry' = -9223372036
VARIABLE CHART 'days_until_expiration_warning' = 14
VARIABLE CHART 'days_until_expiration_critical' = 7
END

BEGIN 'netdata.execution_time_of_whoisquery_annangela.cn'
SET 'time' = 593
END

What I expected to happen

Show correct expiration time.

Hi @AnnAngela

I confirm the bug. The reason is whoisquery collector fails to parse the domain expiration date. We will fix it!

3 Likes

I created an issue and made a PR with the fix.

@AnnAngela thanks for reporting the problem!

2 Likes

Thx for fixing it, and I would like to ask when the fix wil be released? @ilyam8

I think it is going to be next week. We are about to release new version of Netdata, then code freeze for several days…

You can build the plugin from the source and start using it today. Do you need a guide how to do it?

1 Like

No, I will just wait the next release. Thx you again for quick fixing.

If I wasn’t clear, let me reword it - the fix doesn’t make it into the upcoming stable release (v1.31.0). Will be available in the nightly branch after v1.31.0.

Hmmmm, I remember that the doc encourages user to use nightly build. Is it any different between nightly build and nightly branch?

to use nightly build


build/branch is the same (in fact I wanted to say channel, not branch :shushing_face:)

So if I didn’t misunderstand your meaning, you said that the fix missed up next nightly build, it’s still in dev/nightly channel and need to wait the next nightly build after the next one? If so, I would like to try to build the plugin from the source.

Here you go, you need Golang v1.14+ I believe.

git clone https://github.com/netdata/go.d.plugin
cd go.d.plugin
make build

# that is all
# now you have bin/godplugin in the current directory 

systemctl stop netdata.service
# could be not `/opt/netdata/` for you, depends on your install prefix
cp bin/godplugin /opt/netdata/usr/libexec/netdata/plugins.d/go.d.plugin
systemctl start netdata.service

Confirmed that the bug has been addressed after you pr, thank you!

@AnnAngela btw, it was a bug, next time consider opening a bug report on GitHub.

Note for @me: I should have opened it after I realized that it was a bug :grinning_face_with_smiling_eyes:

omg, i did it :see_no_evil: i blame Monday, nvm :grinning_face_with_smiling_eyes:

1 Like