whois query monitor cannot parse expiration time

Hello,
I tried to setup whois query monitor. Unfortunately after standard configuration i get in the error log the information that datetime cannot be parsed:

parsing time "2023.02.24 22:58:50" as "2006.01.24 22:58:50": cannot parse " 22:58:50" as "4" (source: example.com)

In two domains everything worked fine but in two I got this issue
Is it a bug or some configuration issue?

Thank you

Hi, @Mirek_Sternik. Can you run whoisquery in debug mode and share the output?

@ilyam8 of course,

bash-5.1$ ./go.d.plugin -d -m whoisquery
[ DEBUG ] main[main] main.go:113 plugin: name=go.d, version=v0.42.1
[ DEBUG ] main[main] main.go:115 current user: name=netdata, uid=982
[ INFO  ] main[main] agent.go:136 instance is started
[ INFO  ] main[main] setup.go:42 loading config file
[ INFO  ] main[main] setup.go:50 looking for 'go.d.conf' in [/etc/netdata /usr/lib/netdata/conf.d]
[ INFO  ] main[main] setup.go:57 found '/etc/netdata/go.d.conf
[ INFO  ] main[main] setup.go:64 config successfully loaded
[ INFO  ] main[main] agent.go:140 using config: enabled 'true', default_run 'true', max_procs '0'
[ INFO  ] main[main] setup.go:69 loading modules
[ INFO  ] main[main] setup.go:88 enabled/registered modules: 1/76
[ INFO  ] main[main] setup.go:93 building discovery config
[ INFO  ] main[main] setup.go:123 looking for 'whoisquery.conf' in [/etc/netdata/go.d /usr/lib/netdata/conf.d/go.d]
[ INFO  ] main[main] setup.go:139 found '/etc/netdata/go.d/whoisquery.conf
[ INFO  ] main[main] setup.go:144 dummy/read/watch paths: 0/1/0
[ INFO  ] discovery[manager] manager.go:92 registered discoverers: [file discovery: [file reader]]
[ INFO  ] discovery[manager] manager.go:97 instance is started
[ INFO  ] discovery[file manager] discovery.go:73 instance is started
[ INFO  ] discovery[file reader] read.go:41 instance is started
[ INFO  ] build[manager] build.go:107 instance is started
[ INFO  ] run[manager] run.go:32 instance is started
[ INFO  ] discovery[file reader] read.go:42 instance is stopped
[ DEBUG ] build[manager] build.go:154 received config group ('/etc/netdata/go.d/whoisquery.conf'): 4 jobs (added: 4, removed: 0)
[ DEBUG ] build[manager] build.go:303 building whoisquery[gemour_pl] job, config: map[__provider__:file reader __source__:/etc/netdata/go.d/whoisquery.conf autodetection_retry:0 module:whoisquery name:gemour_pl priority:70000 source:gemour.pl update_every:60]
[ DEBUG ] run[manager] run.go:43 tick 0
[ ERROR ] whoisquery[gemour_pl] whoisquery.go:86 parsing time "2024.11.04 21:49:10" as "2006.01.04 21:49:10": cannot parse ":49:10" as "1" (source: gemour.pl)
[ ERROR ] whoisquery[gemour_pl] job.go:191 check failed
[ DEBUG ] build[manager] build.go:303 building whoisquery[panasiewicz_pl] job, config: map[__provider__:file reader __source__:/etc/netdata/go.d/whoisquery.conf autodetection_retry:0 module:whoisquery name:panasiewicz_pl priority:70000 source:panasiewicz.pl update_every:60]
[ ERROR ] whoisquery[panasiewicz_pl] whoisquery.go:86 parsing time "2023.02.24 22:58:50" as "2006.01.24 22:58:50": cannot parse " 22:58:50" as "4" (source: panasiewicz.pl)
[ ERROR ] whoisquery[panasiewicz_pl] job.go:191 check failed
[ DEBUG ] build[manager] build.go:303 building whoisquery[panasiewicz_com] job, config: map[__provider__:file reader __source__:/etc/netdata/go.d/whoisquery.conf autodetection_retry:0 module:whoisquery name:panasiewicz_com priority:70000 source:panasiewicz.com update_every:60]
[ INFO  ] whoisquery[panasiewicz_com] job.go:194 check success
[ DEBUG ] build[manager] build.go:303 building whoisquery[gemour_com] job, config: map[__provider__:file reader __source__:/etc/netdata/go.d/whoisquery.conf autodetection_retry:0 module:whoisquery name:gemour_com priority:70000 source:gemour.com update_every:60]
[ INFO  ] whoisquery[panasiewicz_com] job.go:214 started, data collection interval 60s
[ DEBUG ] run[manager] run.go:43 tick 1
[ INFO  ] whoisquery[gemour_com] job.go:194 check success
[ INFO  ] whoisquery[gemour_com] job.go:214 started, data collection interval 60s
[ DEBUG ] run[manager] run.go:43 tick 2
[ DEBUG ] run[manager] run.go:43 tick 3
.
.
.
CHART 'netdata.execution_time_of_whoisquery_panasiewicz_com' '' 'Execution time' 'ms' 'go.d' 'netdata.go_plugin_execution_time' 'line' '145000' '60' '' 'go.d' 'whoisquery'
CLABEL '_collect_job' 'panasiewicz_com' '1'
CLABEL_COMMIT
DIMENSION 'time' '' 'absolute' '1' '1' ''

CHART 'whoisquery_panasiewicz_com.time_until_expiration' '' 'Time Until Domain Expiration' 'seconds' 'expiration time' 'whoisquery.time_until_expiration' 'line' '70000' '60' 'store_first' 'go.d' 'whoisquery'
CLABEL '_collect_job' 'panasiewicz_com' '1'
CLABEL_COMMIT
DIMENSION 'expiry' '' 'absolute' '1' '1' ''
VARIABLE CHART 'days_until_expiration_warning' = 0
VARIABLE CHART 'days_until_expiration_critical' = 0

BEGIN 'whoisquery_panasiewicz_com.time_until_expiration'
SET 'expiry' = 25530001
VARIABLE CHART 'days_until_expiration_warning' = 90
VARIABLE CHART 'days_until_expiration_critical' = 30
END

BEGIN 'netdata.execution_time_of_whoisquery_panasiewicz_com'
SET 'time' = 943
END

[ DEBUG ] run[manager] run.go:43 tick 61
[ DEBUG ] whoisquery[gemour_com] job.go:208 skip the tick due to previous run hasn't been finished
CHART 'netdata.execution_time_of_whoisquery_gemour_com' '' 'Execution time' 'ms' 'go.d' 'netdata.go_plugin_execution_time' 'line' '145000' '60' '' 'go.d' 'whoisquery'
CLABEL '_collect_job' 'gemour_com' '1'
CLABEL_COMMIT
DIMENSION 'time' '' 'absolute' '1' '1' ''

CHART 'whoisquery_gemour_com.time_until_expiration' '' 'Time Until Domain Expiration' 'seconds' 'expiration time' 'whoisquery.time_until_expiration' 'line' '70000' '60' 'store_first' 'go.d' 'whoisquery'
CLABEL '_collect_job' 'gemour_com' '1'
CLABEL_COMMIT
DIMENSION 'expiry' '' 'absolute' '1' '1' ''
VARIABLE CHART 'days_until_expiration_warning' = 0
VARIABLE CHART 'days_until_expiration_critical' = 0

BEGIN 'whoisquery_gemour_com.time_until_expiration'
SET 'expiry' = 13393160
VARIABLE CHART 'days_until_expiration_warning' = 90
VARIABLE CHART 'days_until_expiration_critical' = 30
END

BEGIN 'netdata.execution_time_of_whoisquery_gemour_com'
SET 'time' = 1283
END
.
.
.
BEGIN 'whoisquery_panasiewicz_com.time_until_expiration' 60000058
SET 'expiry' = 25529941
VARIABLE CHART 'days_until_expiration_warning' = 90
VARIABLE CHART 'days_until_expiration_critical' = 30
END

BEGIN 'netdata.execution_time_of_whoisquery_panasiewicz_com' 60000058
SET 'time' = 325
END

BEGIN 'whoisquery_gemour_com.time_until_expiration' 59999618
SET 'expiry' = 13393101
VARIABLE CHART 'days_until_expiration_warning' = 90
VARIABLE CHART 'days_until_expiration_critical' = 30
END

BEGIN 'netdata.execution_time_of_whoisquery_gemour_com' 59999618
SET 'time' = 714
END

. it’s another ticks ofc.

Thank you

This is the output

Ok, I see - the collector fails to parse the β€œ2024.11.04 21:49:10” string into a date. Usually, the date format is β€œ2024.11.04T21:49:10Z”.

I added a quick fix in fix(whoisquery): handle ExpirationDate with space by ilyam8 Β· Pull Request #974 Β· netdata/go.d.plugin Β· GitHub

Wonderful! When do you plan to release new version with a fix ;-)?

Thank you

PS: How to update go.d.plugin? I tried to google it but no direct instruction. I found only this in community:

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

I will plan to do the release after merging feat: add collector to track NVMe statistics and probably wmi IIS Metrics. Plan is later today or tomorrow.

1 Like