Let $X$ be an arithmetic scheme, that is, a scheme of finite type over the integers. We denote the set of closed points of $X$ by $|X|$. For every $x\in|X|$, write $N(x)$ for the cardinality of the residue field $\kappa(x)$.
The arithmetic zeta function of $X$ is defined as $$\zeta_X(s)=\prod_{x\in|X|}\frac{1}{1-N(x)^{-s}}.$$
This definition (up to a change in variable) can be found in
A. Grothendieck, Formule de Lefschetz et rationalité des fonctions $L$, Séminaire Bourbaki 279 (1964), 41-55.
Grothendieck attributes this definition to Weil, but as far as I know, Weil only defined the Hasse-Weil zeta function: if $X$ is a smooth projective variety over $\mathbb{F}_q$ and $N_r=|X(\mathbb{F}_{q^r})|$, then $$Z_X(t)=\exp\left(\sum_{r=1}^\infty N_r(X)\frac{t^r}{r}\right).$$
Of course, it is easy to show these two functions satisfy $$\zeta_X(s)=Z_X(q^{-s}),$$ but Weil did not address the notion of the zeta function of a scheme, at least not in the original paper:
A. Weil, Numbers of solutions of equations in finite fields, Bull. Amer. Math. Soc. 55 (1949), 497-508.
Where was the zeta function of an arithmetic scheme first defined? If anyone knows the actual paper in which this first appears, that would be optimal. (Of course, it's very possible that this definition was well-known but unpublished for some time; that would be an acceptable answer too.)