That's not a true prometheus metric then.
If it's a counter, then it would have some value (say 1234) which persists indefinitely, visible on every scrape. Then when a fan alarm event happens, it would go to 1235, and then remain at that value thereafter until the next event. If you don't have a mechanism to keep the counter around, then you can use stats_exporter to do it for you.
If it's a gauge, then it will have value 1 while the fan alarm condition is present, and 0 while the fan alarm condition is not present.