Hello! Currently working on the V3 to V4 migration with my team, and we have been running into an error regarding the gateway metrics that are trying to be migrated over from Redis. The error we run into is the following: Store gateway-metrics error, gateway_id: ac1f09fffe03e271, error: ERR wrong number of arguments for 'hset' command
I modified the main.go file to print out these metrics when running through the migration (which prints ALOT of data) but when it ran into the error, I don’t know or see what could be missing. As far as I know, these are just cached records with some information about rx/tx frequencies, counts, data rates, etc. Nothing that I believe to be mission critical if it wasn’t migrated over. However, the error is set as fatal and will end the migration script. I have changed this to just print the error out instead, and it continues without issue only ever printing out the error for 2 or 3 gateways out of ~350. Interestingly enough, it is never the same gateways that create the error.
Long story short, my question would be, if this data doesn’t get migrated for the few gateways is this going to cause problems, or will I just lose some historical metric data that will be irrelevant after a week or so?
Thanks!
Instead of modifying the code, please take a look at the available CLI flags:
Usage:
chirpstack-v3-to-v4 [flags]
Flags:
--as-config-file string Path to chirpstack-application-server.toml configuration file
--cs-config-file string Path to chirpstack.toml configuration file
--deveui-list-file string Path to file containing DevEUIs to migrate (one DevEUI per line)
--device-profile-id-list-file string Path to file containing list of Device Profile IDs to migrate (one per line)
--device-session-ttl-days int Device-session TTL in days (default 31)
--disable-migrated-devices Disable migrated devices in ChirpStack v3
--drop-tenants-and-users Drop tenants and users before migration
-h, --help help for chirpstack-v3-to-v4
--migrate-applications Migrate applications (default true)
--migrate-device-metrics Migrate device metrics (default true)
--migrate-device-profiles Migrate device profiles (default true)
--migrate-devices Migrate devices (default true)
--migrate-gateway-metrics Migrate gateway metrics (default true)
--migrate-gateways Migrate gateways (default true)
--migrate-tenants Migrate tenants (default true)
--migrate-users Migrate users (default true)
--ns-config-file stringArray Path to chirpstack-network-server.toml configuration file (can be repeated)
Using --migrate-gateway-metrics=false --migrate-device-metrics=false
should fix your issue. These metrics are not critical and your v4 instance will work fine without.