This answer uses electronegativities for the calculation of oxidation states as proposed in the Expanded Definition of the Oxidation State by Hans-Peter Loock in 2011.
Comparing Electronegativities
The following table shows an excerpt from Pauling electronegativities ($\chi_{\mathrm{Pauling}}$):
$$\begin{array}{cc}
\hline
\text{Element} & \chi_{\mathrm{Pauling}}\\
\hline
\ce{H} & 2.20\\
\ce{N} & 3.04\\
\hline
\end{array}$$
Looking at $\ce{N-H}$ Bond (heteroatomic)
The table shows, that the nitrogen atom is more electronegative than the hydrogen atom. It will therefore attract the electrons more than hydrogen does, and thus polarize the bond. Imagining the gedankenexperiment of an hypothetical heterolytical bond cleavage - presumed by applying pulling force to the atoms, until they get separated - it is assumed, that the electrons are allocated to the nitrogen atom during separation.
Looking at $\ce{N-N}$ and $\ce{N=N}$ Bonds (homoatomic)
Looking again at the previous gedankenexperiment, now with two identical Atoms bound to each other. Since they have, of course, the same electronegativity, there is no polarization of the bond. It is assumed, that separation would therefore result in an homolytical bond cleavage, allocating always one electron to each of the two nitrogen atoms for each bond respectively.
Summing up
Now, having a look on the complete structure of the molecule in question, and applying the previously states rules:
Last thing to do is calculating the atoms hypothetical charge after separation, which is to be equatable with the oxidation state:
$$ \text{Oxidation state} = N_\mathrm{i}(\ce{e-}) - N_\mathrm{f}(\ce{e-}) $$
With $ N_\mathrm{i}(\ce{e-}) $ representating the number of electrons in a free atom, and $ N_\mathrm{f}(\ce{e-}) $ the one after separation (One should not forget the lone pairs).
One will end up with the following oxidation states for the different (nitrogen) atoms, with the last entry representating the mean oxidation state of all nitrogen atoms:
$$\begin{array}{cccc}
\hline
\text{Atom} & N_\mathrm{i}(\ce{e-}) & N_\mathrm{f}(\ce{e-}) &\text{Oxidation state}\\
\hline
\ce{H} & 1 & 0 & +1\\
\hline
\ce{N-1} & 5 & 5 & 0\\
\ce{N-2} & 5 & 5 & 0\\
\ce{N-3} & 5 & 6 & -1\\
\hline
\ce{N} & - & - & -\frac{1}{3}\\
\hline
\end{array}$$
And the structure with assigned oxidation states: