diff --git a/gocollect.conf.sample b/gocollect.conf.sample index 96231f8..5dfd2b9 100644 --- a/gocollect.conf.sample +++ b/gocollect.conf.sample @@ -13,9 +13,9 @@ register_url = http://localhost:8000/register/ # push_url: Specify URL where to post the data. # The {ip4} and {fqdn} parameters are taken from the core.id script. +# The {regid} parameter is the (unique) identifier obtained from +# the registry; also taken from the core.id script. # The {_collector} parameter is the collector name/key. -# The {_regid} parameter is the (unique) identifier obtained from -# the registry. # # For now, we've decided to do without auth on the collector server. # We won't do automatic billing based on the imported values and the diff --git a/gocollector/actions.go b/gocollector/actions.go index 75660b9..03a50f8 100644 --- a/gocollector/actions.go +++ b/gocollector/actions.go @@ -136,8 +136,7 @@ func register(registerURL string, coreIDData Collected, } os.MkdirAll(path.Dir(regidFilename), 0755) - err = ioutil.WriteFile( - "/var/lib/gocollect/core.id.regid", []byte(value), 0400) + err = ioutil.WriteFile(regidFilename, []byte(value), 0400) if err != nil { logger.Fatal("Could not write core.id.regid: ", err) return false