Starts as 0, becomes 1 when the VRP database has been populated.
Intended to replace the awkward log msg at least one user tracks:
> First validation cycle successfully ended,
> now you can connect your router(s)
For #133.
rtr_notify();
- /*
- * See issue #133.
- * TODO (#50) Remove this message once the stats server is implemented.
- */
+ /* TODO (#133) Stats ready; remove this message in a couple versions. */
pr_op_warn("First validation cycle successfully ended, now you can connect your router(s)");
+ stats_gauge_set(stat_rtr_ready, 1);
do {
pr_op_info("Main loop: Sleeping.");
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
static struct stats_gauge *gauges;
+struct stats_gauge *stat_rtr_ready;
struct stats_gauge *stat_rtr_connections;
/* Steals ownership of @name */
int
stats_setup(void)
{
+ stat_rtr_ready = ADD_GAUGE("fort_rtr_ready");
stat_rtr_connections = ADD_GAUGE("fort_rtr_current_connections");
return 0;
}
#define SRC_STATS_H_
struct stats_gauge;
+extern struct stats_gauge *stat_rtr_ready;
extern struct stats_gauge *stat_rtr_connections;
int stats_setup(void);