I'm currently developing in Vuetify and I want to incorporate a javascript client for Prometheus to fetch data for my application. You can find the page Here. Despite following their example, I keep encountering a ReferenceError: Prometheus is not defined when attempting to execute the code. Here's what I have:
<script>
import 'prometheus-query'
const prom = new PrometheusDriver({'removed for security'
}
})
const q = 'count(node_uname_info{job="MAK_Eos_Lab"})'
prom.instantQuery(q)
.then((res) => {
console.log(res.result)
})
.catch(console.error)
export default {
name: 'Mackinac',
}
</script>