For a scheme $X$, people sometimes use $|X|$$\lvert X\rvert$ to denote the set of closed points of $X$. So the set of primes is $|\operatorname{Spec}(\mathbb{Z})|$ and you have:$$\zeta(s)=\prod_{p\in|\operatorname{Spec}(\mathbb{Z})|}\frac{1}{1-p^{-s}}.$$$$\zeta(s)=\prod_{p\in\lvert \operatorname{Spec}(\mathbb{Z})\rvert}\frac{1}{1-p^{-s}}.$$
This formula of course generalizes to give the $\zeta$-function of any scheme $X$ of finite type over $\mathbb{Z}$ (e.g., a variety of finite type over a finite field): $$\zeta_X(s)=\prod_{x\in|X|}\frac{1}{1-|\kappa(x)|^{-s}}$$$$\zeta_X(s)=\prod_{x\in\lvert X\rvert}\frac{1}{1-|\kappa(x)|^{-s}}$$ where $\kappa(x)$ is the residue field at $x$ and $|\kappa(x)|$$\lvert\kappa(x)\rvert$ is its order.