MongoDB and openhab2 on same raspberry pi

I installed openhab2 and mongodb on my pi3.

  1. Created a service configuration mongodb.cfg …
url=mongodb://localhost:27017
database=openhab
collection=persistence
  1. Created a persistence file sensor.persist …
Strategies {
    everyMinute : "0 * * * * ?"
    everyHour : "0 0 * * * ?"
    everyDay  : "0 0 0 * * ?"

    default = everyChange
}
Items {
    * : strategy = everyChange, everyDay, restoreOnStartup
}

I also created database and collection manualy through mongo console but i still get no entries.

Something went wrong how can i check?
Or any better solutions for persistence on same pi runing openhab?

I switched to influxdb. Working fine!