Hey,
Currently considering moving to FreeNAS from Storage Spaces. One of the things I've done with Storage Spaces, is for things that need to know when a file is changed in a particular directory, is I've run a Windows App on the server, which monitors the directory through the file watching API, and then broadcasts a message on MQTT when something has changed, so the service running on another machine (and connected via SMB or NFS so can't run this API itself), can react and do something.
I was looking at how to implement this with FreeNAS. I was thinking that potentially creating a Jail with a simple app that does this, using the same technique, using kqueue to monitor a certain directory structure in the pool, and if something happens, fire it off onto MQTT. Is this a viable solution? I'm aware kqueue isn't ideal compared to INotify or Windows APIs, but it might be sufficient to do stuff I need to do.
Thanks!
Currently considering moving to FreeNAS from Storage Spaces. One of the things I've done with Storage Spaces, is for things that need to know when a file is changed in a particular directory, is I've run a Windows App on the server, which monitors the directory through the file watching API, and then broadcasts a message on MQTT when something has changed, so the service running on another machine (and connected via SMB or NFS so can't run this API itself), can react and do something.
I was looking at how to implement this with FreeNAS. I was thinking that potentially creating a Jail with a simple app that does this, using the same technique, using kqueue to monitor a certain directory structure in the pool, and if something happens, fire it off onto MQTT. Is this a viable solution? I'm aware kqueue isn't ideal compared to INotify or Windows APIs, but it might be sufficient to do stuff I need to do.
Thanks!