Community discussions

MikroTik App
 
KsaFad
just joined
Topic Author
Posts: 4
Joined: Sun Aug 16, 2015 7:20 am

counter of link-downs ether

Tue Jan 07, 2020 5:53 am

Helloy, help please

in C# connect to Mikrotik via API command:

mikrotik.Send("/interface/ethernet/monitor");
mikrotik.Send("=numbers=ether1");
mikrotik.Send("=once");
mikrotik.Send(".tag=interface", true);


a got next:

"!re.tag=interface=name=ether1=status=link-ok=auto-negotiation=done=rate=100Mbps=full-duplex=true=tx-flow-control=false=rx-flow-control=false=advertising=10M-half,10M-full,100M-half,100M-full=link-partner-advertising=10M-half,10M-full,100M-half,100M-full"

i want get counter of link-downs,
in terminal :
:put [/interface get [find name=ether1] value-name=link-downs]
 
jondavy
Member Candidate
Member Candidate
Posts: 143
Joined: Tue May 12, 2009 11:14 pm
Location: Brasil

Re: counter of link-downs ether

Thu Jan 09, 2020 8:05 pm

:put [/interface get ether1 link-downs];
 
alicmkrtn
just joined
Posts: 3
Joined: Mon Jan 13, 2020 12:58 pm

Re: counter of link-downs ether

Wed Jan 15, 2020 10:27 am

hello. ı can't connect mikrotik device. (visual studio c# form application) can you help me ?
 
KsaFad
just joined
Topic Author
Posts: 4
Joined: Sun Aug 16, 2015 7:20 am

Re: counter of link-downs ether

Wed Feb 12, 2020 7:32 am

:put [/interface get ether1 link-downs];

how to send this command via api?
 
KsaFad
just joined
Topic Author
Posts: 4
Joined: Sun Aug 16, 2015 7:20 am

Re: counter of link-downs ether

Wed Feb 12, 2020 7:32 am

hello. ı can't connect mikrotik device. (visual studio c# form application) can you help me ?
contact with me KsaFad@mail.ru
 
diabolusss
just joined
Posts: 14
Joined: Tue Sep 27, 2022 10:55 am
Location: Latvia, Riga

Re: counter of link-downs ether

Tue Sep 27, 2022 11:12 am

:put [/interface get ether1 link-downs];
how to send this command via api?
Hello. I know that this post is old, yet i've searched everywhere to find an answer to this question with no luck. So, i'll post it here, in case it saves someone time.
$ curl  -u api:pass https://mikrotik.lan/rest/interface?type=lte -X GET -H "content-type: application/json"

\[
  {
    ".id": "*8",
    "actual-mtu": "1500",
    "default-name": "lte1",
    "disabled": "false",
    "fp-rx-byte": "1002863553",
    "fp-rx-packet": "731589",
    "fp-tx-byte": "0",
    "fp-tx-packet": "0",
    "last-link-down-time": "sep/27/2022 10:25:55",
    "last-link-up-time": "sep/27/2022 10:25:58",
    "link-downs": "16",
    "mac-address": "XX:XX:...",
    "mtu": "1500",
    "name": "lte1",
    "running": "true",
    "rx-byte": "1002863553",
    "rx-drop": "0",
    "rx-error": "0",
    "rx-packet": "731589",
    "tx-byte": "91478165",
    "tx-drop": "0",
    "tx-error": "0",
    "tx-packet": "380954",
    "tx-queue-drop": "2",
    "type": "lte"
  }
\]

Who is online

Users browsing this forum: GoogleOther [Bot] and 25 guests