'How Nomad knows internally about the allocation status of job (Running, Failed, Queued, Starting, Complete, Lost)?

Allocation status Screenshot

Hi team, we can see about the allocation status of a job in nomad UI / command line. but how nomad finds whether a job is running or it failed or it completed ? Basically want to know how nomad figure out about allocation status.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source