Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding sensors in scrape-util require manual change of initial timestamp #32

Open
carlosparadis opened this issue May 15, 2019 · 0 comments

Comments

@carlosparadis
Copy link
Member

carlosparadis commented May 15, 2019

When adding the webctrl sensors to #30, the steps described in the config wiki were followed, but sensors would still not work.

Additionally, inspecting the state timestamp of the individual sensors /var/local/scrape-util/projects/uhm-frog/state-files, suggested the sensors were not being added to the state file, as their names did not appear.

To force start adding it, rather than wait for the crontab, I then executed scrape-util manually:

sudo vim /etc/crontab 

Was used to see the current cron tabs, and then executing scrape-util in the same way as the crontab.
This resulted in the sensors being added to:

/var/local/scrape-util/projects/uhm-frog/state-files/webctrl.toml

After the sensors were added with the timestamp in unix, the data was still not being inserted in the database.

The default unix timestamp that is used in state-files/webctrl.toml after modifying value-remap.toml and webctrl-config.toml as part of the process in adding a new sensor explained in the config wiki seems to date to May 2017. Replacing it to the day before the readings of the new sensors in

/var/local/scrape-util/projects/uhm-frog/state-files/webctrl.toml

And re-running scrape-util made it work. It was also noted on the output the insertions happened (sample below of how it looks like, this is a small portion of the log it generates):

row(datetime=1557887700.0, purpose_id=118, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557888000.0, purpose_id=118, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557888300.0, purpose_id=118, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557888600.0, purpose_id=118, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557888900.0, purpose_id=118, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557889200.0, purpose_id=118, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557888600.0, purpose_id=83, units='wm-2', reading=389.0, upload_timestamp=1557889255.24)
row(datetime=1557888900.0, purpose_id=83, units='wm-2', reading=453.6, upload_timestamp=1557889255.24)
row(datetime=1557889200.0, purpose_id=83, units='wm-2', reading=458.0, upload_timestamp=1557889255.24)
row(datetime=1557876600.0, purpose_id=119, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557876900.0, purpose_id=119, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557877200.0, purpose_id=119, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557877500.0, purpose_id=119, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557877800.0, purpose_id=119, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557878100.0, purpose_id=119, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557878400.0, purpose_id=119, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557878700.0, purpose_id=119, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557879000.0, purpose_id=119, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557879300.0, purpose_id=119, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557879600.0, purpose_id=119, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557879900.0, purpose_id=119, units='bool', reading=0.0, upload_timestamp=1557889255.24)
row(datetime=1557880200.0, purpose_id=119, units='bool', reading=0.0, upload_timestamp=1557889255.24)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant